CAP_GET_FLAG(3C) CAP_GET_FLAG(3C)
cap_get_flag, cap_set_flag - get or set the value of a capability flag in
a capability
#include <sys/capability.h>
int cap_get_flag(cap_t cap_p, cap_value_t cap, cap_flag_t flag,
cap_flag_value_t *value_p);
int cap_set_flag(cap_t cap_p, cap_flag_t flag, int ncap, cap_value_t
caps[], cap_flag_value_t value);
cap_get_flag Extracts the current value of the specified capability flag
(flag) of the capability cap from the capability set pointed to by cap_p
and stores it in the location pointed to by value.
cap_set_flag Sets the specified capability flag (flag) in each of the
array of capabilities caps (which has ncaps elements)of the from the
capability set pointed to by cap_p and from the location pointed to by
value.
Both functions return 0 if successful, -1 otherwise.
cap_get_flag
EINVAL arguments are invalid
ENOSYS Capability support is not available (not installed).
cap_set_flag:
EINVAL arguments are invalid
ENOSYS Capability support is not available (not installed).
capabilities(4)
PPPPaaaaggggeeee 1111 [ Back ]
|