Debian Codegraph @

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

raw
1 .\" Copyright 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_CAP_AMBIENT_IS_SET 2const 2026-02-08 "Linux man-pages 6.18"
7 .SH NAME
8 PR_CAP_AMBIENT_IS_SET
9 \-
10 read the ambient capability set 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_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, long " cap ", 0L, 0L);"
20 .fi
21 .SH DESCRIPTION
22 This call
23 returns 1 if the capability in
24 .I cap
25 is in the ambient capability set and 0 if it is not.
26 .SH RETURN VALUE
27 On success,
28 this call
29 returns the boolean value described above.
30 On error, \-1 is returned, and
31 .I errno
32 is set to indicate the error.
33 .SH ERRORS
34 .TP
35 .B EINVAL
36 .I cap
37 does not specify a valid capability.
38 .SH VERSIONS
39 See
40 .BR PR_CAP_AMBIENT (2const).
41 .SH STANDARDS
42 Linux.
43 .SH HISTORY
44 Linux 4.3.
45 .\" commit 58319057b7847667f0c9585b9de0e8932b0fdb08
46 .SH SEE ALSO
47 .BR prctl (2),
48 .BR PR_CAP_AMBIENT (2const),
49 .BR libcap (3)