diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/rustix/src/thread | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustix/src/thread')
-rw-r--r-- | vendor/rustix/src/thread/id.rs | 10 | ||||
-rw-r--r-- | vendor/rustix/src/thread/prctl.rs | 21 |
2 files changed, 18 insertions, 13 deletions
diff --git a/vendor/rustix/src/thread/id.rs b/vendor/rustix/src/thread/id.rs index 59610ff03..3143b068b 100644 --- a/vendor/rustix/src/thread/id.rs +++ b/vendor/rustix/src/thread/id.rs @@ -26,7 +26,8 @@ pub fn gettid() -> Pid { /// though that is in violation of the POSIX standard. /// /// For details on this distinction, see the C library vs. kernel differences -/// in the [man page][linux_notes]. This call implements the kernel behavior. +/// in the [manual page][linux_notes]. This call implements the kernel +/// behavior. /// /// # References /// - [POSIX] @@ -50,7 +51,7 @@ pub fn set_thread_uid(uid: Uid) -> io::Result<()> { /// though that is in violation of the POSIX standard. /// /// For details on this distinction, see the C library vs. kernel differences -/// in the [man page][linux_notes] and the notes in [`set_thread_uid`]. This +/// in the [manual page][linux_notes] and the notes in [`set_thread_uid`]. This /// call implements the kernel behavior. /// /// # References @@ -73,7 +74,8 @@ pub fn set_thread_res_uid(ruid: Uid, euid: Uid, suid: Uid) -> io::Result<()> { /// though that is in violation of the POSIX standard. /// /// For details on this distinction, see the C library vs. kernel differences -/// in the [man page][linux_notes]. This call implements the kernel behavior. +/// in the [manual page][linux_notes]. This call implements the kernel +/// behavior. /// /// # References /// - [POSIX] @@ -97,7 +99,7 @@ pub fn set_thread_gid(gid: Gid) -> io::Result<()> { /// though that is in violation of the POSIX standard. /// /// For details on this distinction, see the C library vs. kernel differences -/// in the [man page][linux_notes] and the notes in [`set_thread_gid`]. This +/// in the [manual page][linux_notes] and the notes in [`set_thread_gid`]. This /// call implements the kernel behavior. /// /// # References diff --git a/vendor/rustix/src/thread/prctl.rs b/vendor/rustix/src/thread/prctl.rs index f1ddf7d36..2e11ff247 100644 --- a/vendor/rustix/src/thread/prctl.rs +++ b/vendor/rustix/src/thread/prctl.rs @@ -129,20 +129,23 @@ impl TryFrom<i32> for SecureComputingMode { /* /// Get the secure computing mode of the calling thread. /// -/// If the caller is not in secure computing mode, this returns [`SecureComputingMode::Disabled`]. -/// If the caller is in strict secure computing mode, then this call will cause a `SIGKILL` signal -/// to be sent to the process. -/// If the caller is in filter mode, and this system call is allowed by the seccomp filters, -/// it returns [`SecureComputingMode::Filter`]; otherwise, the process is killed with -/// a `SIGKILL` signal. -/// -/// Since Linux 3.8, the Seccomp field of the `/proc/[pid]/status` file provides a method -/// of obtaining the same information, without the risk that the process is killed; see `proc(5)`. +/// If the caller is not in secure computing mode, this returns +/// [`SecureComputingMode::Disabled`]. If the caller is in strict secure +/// computing mode, then this call will cause a [`Signal::Kill`] signal to be +/// sent to the process. If the caller is in filter mode, and this system call +/// is allowed by the seccomp filters, it returns +/// [`SecureComputingMode::Filter`]; otherwise, the process is killed with +/// a [`Signal::Kill`] signal. +/// +/// Since Linux 3.8, the Seccomp field of the `/proc/[pid]/status` file +/// provides a method of obtaining the same information, without the risk that +/// the process is killed; see [the `proc` manual page]. /// /// # References /// - [`prctl(PR_GET_SECCOMP,...)`] /// /// [`prctl(PR_GET_SECCOMP,...)`]: https://man7.org/linux/man-pages/man2/prctl.2.html +/// [the `proc` manual page]: https://man7.org/linux/man-pages/man5/proc.5.html #[inline] pub fn secure_computing_mode() -> io::Result<SecureComputingMode> { unsafe { prctl_1arg(PR_GET_SECCOMP) }.and_then(TryInto::try_into) |