PR_CAP_AMBIENT2const
Read or change the ambient capability set of the calling thread
Usage
#include <linux/prctl.h> /* Definition of PR_* constants */ #include <sys/prctl.h>
int prctl(PR_CAP_AMBIENT, long op, ...);
Library
Standard C library (libc, -lc)
Overview
Reads or changes the ambient capability set of the calling thread, according to the value of op, which must be one of the following:
PR_CAP_AMBIENT_RAISE
PR_CAP_AMBIENT_LOWER
PR_CAP_AMBIENT_IS_SET
PR_CAP_AMBIENT_CLEAR_ALL
Return value
On success, a nonnegative value is returned. On error, -1 is returned, and errno is set to indicate the error.
Errors
- EINVAL
-
op is not a valid value.
Versions
Higher-level interfaces layered on top of the above operations are provided in the libcap(3) library in the form of cap_get_ambient(3), cap_set_ambient(3), and cap_reset_ambient(3).
Releases
2 releases since Debian 13 (Trixie); the text changed 1 time.