Debian Codegraph @

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

raw
1 .\" Copyright 2008-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_SET_SECUREBITS 2const 2026-02-08 "Linux man-pages 6.18"
7 .SH NAME
8 PR_SET_SECUREBITS
9 \-
10 set the "securebits" flags of the calling thread
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 .BI "int prctl(PR_SET_SECUREBITS, unsigned long " flags );
20 .fi
21 .SH DESCRIPTION
22 Set the "securebits" flags of the calling thread to the value supplied in
23 .IR flags .
24 See
25 .BR capabilities (7).
26 .SH RETURN VALUE
27 On success,
28 0 is returned.
29 On error, \-1 is returned, and
30 .I errno
31 is set to indicate the error.
32 .SH ERRORS
33 .TP
34 .B EINVAL
35 .I flags
36 is not a valid value.
37 .TP
38 .B EPERM
39 The caller does not have the
40 .B CAP_SETPCAP
41 capability,
42 or tried to unset a "locked" flag,
43 or tried to set a flag whose corresponding locked flag was set
44 (see
45 .BR capabilities (7)).
46 .SH STANDARDS
47 Linux.
48 .SH HISTORY
49 Linux 2.6.26.
50 .SH SEE ALSO
51 .BR prctl (2),
52 .BR PR_GET_SECUREBITS (2const),
53 .BR capabilities (7)