| 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_RAISE 2const 2026-02-08 "Linux man-pages 6.18" |
| 7 |
.SH NAME |
| 8 |
PR_CAP_AMBIENT_RAISE |
| 9 |
\- |
| 10 |
add to 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_RAISE, long " cap ", 0L, 0L);" |
| 20 |
.fi |
| 21 |
.SH DESCRIPTION |
| 22 |
The capability specified in |
| 23 |
.I cap |
| 24 |
is added to the ambient capability set. |
| 25 |
The specified capability must already be present in |
| 26 |
both the permitted and the inheritable sets of the process. |
| 27 |
This operation is not permitted if the |
| 28 |
.B SECBIT_NO_CAP_AMBIENT_RAISE |
| 29 |
securebit is set. |
| 30 |
.SH RETURN VALUE |
| 31 |
On success, |
| 32 |
0 is returned. |
| 33 |
On error, \-1 is returned, and |
| 34 |
.I errno |
| 35 |
is set to indicate the error. |
| 36 |
.SH ERRORS |
| 37 |
.TP |
| 38 |
.B EINVAL |
| 39 |
.I cap |
| 40 |
does not specify a valid capability. |
| 41 |
.TP |
| 42 |
.B EPERM |
| 43 |
either the capability specified in |
| 44 |
.I cap |
| 45 |
is not present in the process's permitted and inheritable capability sets, |
| 46 |
or the |
| 47 |
.B PR_CAP_AMBIENT_LOWER |
| 48 |
securebit has been set. |
| 49 |
.SH VERSIONS |
| 50 |
See |
| 51 |
.BR PR_CAP_AMBIENT (2const). |
| 52 |
.SH STANDARDS |
| 53 |
Linux. |
| 54 |
.SH HISTORY |
| 55 |
Linux 4.3. |
| 56 |
.\" commit 58319057b7847667f0c9585b9de0e8932b0fdb08 |
| 57 |
.SH SEE ALSO |
| 58 |
.BR prctl (2), |
| 59 |
.BR PR_CAP_AMBIENT (2const), |
| 60 |
.BR libcap (3) |