diff options
| author | Alejandro Colomar <alx@kernel.org> | 2024-05-29 21:48:01 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2024-05-31 01:51:56 +0200 |
| commit | 77050d368e549d2b17eb70b5fc29e4a2bf8351b0 (patch) | |
| tree | f3e7206adbfa0bcd65f03627cb88e48e625daf9f | |
| parent | 093de3e77954219d81550e3e9ad55ece82d8b2bb (diff) | |
| download | man-pages-77050d368e549d2b17eb70b5fc29e4a2bf8351b0.tar.gz | |
PR_GET_NO_NEW_PRIVS.2const: Tweak after split
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man/man2const/PR_GET_NO_NEW_PRIVS.2const | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/man/man2const/PR_GET_NO_NEW_PRIVS.2const b/man/man2const/PR_GET_NO_NEW_PRIVS.2const index 773bb149a1..6d1a845128 100644 --- a/man/man2const/PR_GET_NO_NEW_PRIVS.2const +++ b/man/man2const/PR_GET_NO_NEW_PRIVS.2const @@ -1,10 +1,9 @@ .\" Copyright 2012, Kees Cook <keescook@chromium.org> .\" Copyright 2012, 2013, 2015, Michael Kerrisk <mtk.manpages@gmail.com> +.\" Copyright 2024, Alejandro Colomar <alx@kernel.org> .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.\" 2012-09-20 Kees Cook, document PR_GET_NO_NEW_PRIVS -.\" .TH PR_GET_NO_NEW_PRIVS 2const (date) "Linux man-pages (unreleased)" .SH NAME PR_GET_NO_NEW_PRIVS @@ -17,12 +16,10 @@ Standard C library .nf .B #include <sys/prctl.h> .P -.BI "int prctl(int " op ", ...);" +.B int prctl(PR_GET_NO_NEW_PRIVS, 0L, 0L, 0L, 0L); .fi .SH DESCRIPTION -.TP -.BR PR_GET_NO_NEW_PRIVS " (since Linux 3.5)" -Return (as the function result) the value of the +Return the value of the .I no_new_privs attribute for the calling thread. A value of 0 indicates the regular @@ -30,17 +27,28 @@ A value of 0 indicates the regular behavior. A value of 1 indicates .BR execve (2) -will operate in the privilege-restricting mode described above. +will operate in the privilege-restricting mode described in +.BR PR_SET_NO_NEW_PRIVS (2const). .SH RETURN VALUE On success, -.BR PR_GET_NO_NEW_PRIVS , -return the nonnegative values described above. +.B PR_GET_NO_NEW_PRIVS +returns the boolean value described above. On error, \-1 is returned, and .I errno is set to indicate the error. +.SH FILES +.TP +.IR /proc/ pid /status +Since Linux 4.10, +the value of a thread's +.I no_new_privs +attribute can be viewed via the +.I NoNewPrivs +field in this file. .SH STANDARDS Linux. .SH HISTORY +Linux 3.5. .SH SEE ALSO .BR prctl (2), .BR PR_SET_NO_NEW_PRIVS (2const) |
