From 9835e2ae736235810b4ea1c162ca5e65c547e770 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 04:49:50 +0200 Subject: Merging upstream version 1.71.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/rustix/src/thread/id.rs | 10 ++++++---- vendor/rustix/src/thread/prctl.rs | 21 ++++++++++++--------- 2 files changed, 18 insertions(+), 13 deletions(-) (limited to 'vendor/rustix/src/thread') 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 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 { unsafe { prctl_1arg(PR_GET_SECCOMP) }.and_then(TryInto::try_into) -- cgit v1.2.3