| 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 2const 2026-02-08 "Linux man-pages 6.18" |
| 7 |
.SH NAME |
| 8 |
PR_CAP_AMBIENT |
| 9 |
\- |
| 10 |
read or change 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, long " op ", ...);" |
| 20 |
.fi |
| 21 |
.SH DESCRIPTION |
| 22 |
Reads or changes the ambient capability set of the calling thread, |
| 23 |
according to the value of |
| 24 |
.IR op , |
| 25 |
which must be one of the following: |
| 26 |
.TP |
| 27 |
.B PR_CAP_AMBIENT_RAISE |
| 28 |
.TQ |
| 29 |
.B PR_CAP_AMBIENT_LOWER |
| 30 |
.TQ |
| 31 |
.B PR_CAP_AMBIENT_IS_SET |
| 32 |
.TQ |
| 33 |
.B PR_CAP_AMBIENT_CLEAR_ALL |
| 34 |
.SH RETURN VALUE |
| 35 |
On success, |
| 36 |
a nonnegative value is returned. |
| 37 |
On error, \-1 is returned, and |
| 38 |
.I errno |
| 39 |
is set to indicate the error. |
| 40 |
.SH ERRORS |
| 41 |
.TP |
| 42 |
.B EINVAL |
| 43 |
.I op |
| 44 |
is not a valid value. |
| 45 |
.SH VERSIONS |
| 46 |
Higher-level interfaces layered on top of the above operations are |
| 47 |
provided in the |
| 48 |
.BR libcap (3) |
| 49 |
library in the form of |
| 50 |
.BR cap_get_ambient (3), |
| 51 |
.BR cap_set_ambient (3), |
| 52 |
and |
| 53 |
.BR cap_reset_ambient (3). |
| 54 |
.SH STANDARDS |
| 55 |
Linux. |
| 56 |
.SH HISTORY |
| 57 |
Linux 4.3. |
| 58 |
.\" commit 58319057b7847667f0c9585b9de0e8932b0fdb08 |
| 59 |
.SH SEE ALSO |
| 60 |
.BR prctl (2), |
| 61 |
.BR PR_CAP_AMBIENT_RAISE (2const), |
| 62 |
.BR PR_CAP_AMBIENT_LOWER (2const), |
| 63 |
.BR PR_CAP_AMBIENT_IS_SET (2const), |
| 64 |
.BR PR_CAP_AMBIENT_CLEAR_ALL (2const), |
| 65 |
.BR libcap (3), |
| 66 |
.BR cap_get_ambient (3), |
| 67 |
.BR cap_set_ambient (3), |
| 68 |
.BR cap_reset_ambient (3) |