CAP_GET_FLAG(3)

NAME
cap_get_flag - Get the Value of a Capability Flag

SYNOPSIS
#include <sys/types.h>
#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);

DESCRIPTION
The function cap_get_flag() shall obtain the current value of the capability flag flag of the capability cap from the capability state in working storage identified by cap_p and place it into the location pointed to by value_p.

IMPLEMENTATION NOTES
FreeBSD's support for POSIX.1e interfaces and features is still under development at this time.

RETURN VALUES
Upon successful completion, the function shall return a value of zero. Otherwise, a value of -1 shall be returned and errno set to indicate the error.

ERRORS
If any of the following conditions occur, the cap_get_flag() function shall return -1 and set errno to the corresponding value:

[EINVAL]
    At least one of the values of the cap_p, cap, flag and value_p arguments does not refer to the corresponding entity.

SEE ALSO
cap(3), cap_set_flag(3), posix1e(3)

STANDARDS
POSIX.1e is described in IEEE POSIX.1e draft 17. Discussion of the draft continues on the cross-platform POSIX.1e implementation mailing list. To join this list, see the FreeBSD POSIX.1e implementation page for more information.

HISTORY
Support for POSIX.1e Capabilities was developed as part of the TrustedBSD Project. POSIX.1e Capability support was introduced in FreeBSD 5.0, and development continues.

AUTHORS
Robert N M Watson

BUGS
These features are not yet fully implemented.