Debian Codegraph @

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

raw
1 .\" Copyright 2008, 2012, 2013, 2015, Michael Kerrisk <[email protected]>
2 .\" Copyright 2024, Alejandro Colomar <[email protected]>
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH PR_SET_SECUREBITS 2const 2024-06-02 "Linux man-pages 6.9.1"
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 .I op
40 is
41 .BR PR_SET_SECUREBITS ,
42 and the caller does not have the
43 .B CAP_SETPCAP
44 capability,
45 or tried to unset a "locked" flag,
46 or tried to set a flag whose corresponding locked flag was set
47 (see
48 .BR capabilities (7)).
49 .SH STANDARDS
50 Linux.
51 .SH HISTORY
52 Linux 2.6.26.
53 .SH SEE ALSO
54 .BR prctl (2),
55 .BR PR_GET_SECUREBITS (2const),
56 .BR capabilities (7)