Home | man(2)


PR_CAP_AMBIENT(2const)                                  PR_CAP_AMBIENT(2const)

NAME
       PR_CAP_AMBIENT - read or change the ambient capability set of the call‐
       ing thread

LIBRARY
       Standard C library (libc, -lc)

SYNOPSIS
       #include <linux/prctl.h>  /* Definition of PR_* constants */
       #include <sys/prctl.h>

       int prctl(PR_CAP_AMBIENT, long op, ...);

DESCRIPTION
       Reads  or changes the ambient capability set of the calling thread, ac‐
       cording 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 pro‐
       vided in the libcap(3)  library  in  the  form  of  cap_get_ambient(3),
       cap_set_ambient(3), and cap_reset_ambient(3).

STANDARDS
       Linux.

HISTORY
       Linux 4.3.

SEE ALSO
       prctl(2),  PR_CAP_AMBIENT_RAISE(2const),  PR_CAP_AMBIENT_LOWER(2const),
       PR_CAP_AMBIENT_IS_SET(2const),  PR_CAP_AMBIENT_CLEAR_ALL(2const),  lib‐
       cap(3), cap_get_ambient(3), cap_set_ambient(3), cap_reset_ambient(3)

Linux man-pages 6.9.1             2024-06-01            PR_CAP_AMBIENT(2const)