Debian Codegraph @

upstream/debian-unstable/man2/PR_CAPBSET_READ.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_CAPBSET_READ 2const 2026-02-08 "Linux man-pages 6.18"
7 .SH NAME
8 PR_CAPBSET_READ
9 \-
10 read the calling thread's capability bounding set
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_CAPBSET_READ, long " cap );
20 .fi
21 .SH DESCRIPTION
22 Return 1 if the capability specified in
23 .I cap
24 is in the calling thread's capability bounding set,
25 or 0 if it is not.
26 .P
27 The capability constants are defined in
28 .IR <linux/capability.h> .
29 .P
30 The capability bounding set dictates
31 whether the process can receive the capability through a
32 file's permitted capability set on a subsequent call to
33 .BR execve (2).
34 .SH RETURN VALUE
35 On success,
36 this call
37 returns the boolean value described above.
38 On error, \-1 is returned, and
39 .I errno
40 is set to indicate the error.
41 .SH ERRORS
42 .TP
43 .B EINVAL
44 .I cap
45 does not specify a valid capability.
46 .SH VERSIONS
47 A higher-level interface layered on top of this operation is provided in the
48 .BR libcap (3)
49 library in the form of
50 .BR cap_get_bound (3).
51 .SH STANDARDS
52 Linux.
53 .SH HISTORY
54 Linux 2.6.25.
55 .SH SEE ALSO
56 .BR prctl (2),
57 .BR PR_CAPBSET_DROP (2const),
58 .BR libcap (3),
59 .BR cap_get_bound (3)