Debian Codegraph @

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

raw
1 .\" Copyright 2008, Serge Hallyn <[email protected]>
2 .\" Copyright 2008, 2012, 2013, 2015, Michael Kerrisk <[email protected]>
3 .\" Copyright 2024, Alejandro Colomar <[email protected]>
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH PR_CAPBSET_READ 2const 2024-06-02 "Linux man-pages 6.9.1"
8 .SH NAME
9 PR_CAPBSET_READ
10 \-
11 read the calling thread's capability bounding set
12 .SH LIBRARY
13 Standard C library
14 .RI ( libc ", " \-lc )
15 .SH SYNOPSIS
16 .nf
17 .BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */"
18 .B #include <sys/prctl.h>
19 .P
20 .BI "int prctl(PR_CAPBSET_READ, long " cap );
21 .fi
22 .SH DESCRIPTION
23 Return 1 if the capability specified in
24 .I cap
25 is in the calling thread's capability bounding set,
26 or 0 if it is not.
27 .P
28 The capability constants are defined in
29 .IR <linux/capability.h> .
30 .P
31 The capability bounding set dictates
32 whether the process can receive the capability through a
33 file's permitted capability set on a subsequent call to
34 .BR execve (2).
35 .SH RETURN VALUE
36 On success,
37 this call
38 returns the boolean value described above.
39 On error, \-1 is returned, and
40 .I errno
41 is set to indicate the error.
42 .SH ERRORS
43 .TP
44 .B EINVAL
45 .I cap
46 does not specify a valid capability.
47 .SH VERSIONS
48 A higher-level interface layered on top of this operation is provided in the
49 .BR libcap (3)
50 library in the form of
51 .BR cap_get_bound (3).
52 .SH STANDARDS
53 Linux.
54 .SH HISTORY
55 Linux 2.6.25.
56 .SH SEE ALSO
57 .BR prctl (2),
58 .BR PR_CAPBSET_DROP (2const),
59 .BR libcap (3),
60 .BR cap_get_bound (3)