Debian Codegraph @

upstream/debian-unstable/man2/PR_GET_NO_NEW_PRIVS.2const

raw
1 .\" Copyright 2012-2015, Michael Kerrisk <[email protected]>
2 .\" Copyright, the authors of the Linux man-pages project
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH PR_GET_NO_NEW_PRIVS 2const 2026-02-08 "Linux man-pages 6.18"
7 .SH NAME
8 PR_GET_NO_NEW_PRIVS
9 \-
10 get the calling thread's no_new_privs attribute
11 .SH LIBRARY
12 Standard C library
13 .RI ( libc ,\~ \-lc )
14 .SH SYNOPSIS
15 .nf
16 .BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */"
17 .B #include <sys/prctl.h>
18 .P
19 .B int prctl(PR_GET_NO_NEW_PRIVS, 0L, 0L, 0L, 0L);
20 .fi
21 .SH DESCRIPTION
22 Return the value of the
23 .I no_new_privs
24 attribute for the calling thread.
25 A value of 0 indicates the regular
26 .BR execve (2)
27 behavior.
28 A value of 1 indicates
29 .BR execve (2)
30 will operate in the privilege-restricting mode described in
31 .BR PR_SET_NO_NEW_PRIVS (2const).
32 .SH RETURN VALUE
33 On success,
34 .B PR_GET_NO_NEW_PRIVS
35 returns the boolean value described above.
36 On error, \-1 is returned, and
37 .I errno
38 is set to indicate the error.
39 .SH FILES
40 .TP
41 .IR /proc/ pid /status
42 Since Linux 4.10,
43 the value of a thread's
44 .I no_new_privs
45 attribute can be viewed via the
46 .I NoNewPrivs
47 field in this file.
48 .SH STANDARDS
49 Linux.
50 .SH HISTORY
51 Linux 3.5.
52 .SH SEE ALSO
53 .BR prctl (2),
54 .BR PR_SET_NO_NEW_PRIVS (2const)