CAP_CLEAR(3)

NAME
cap_clear - Initialize a Capability State in Working Store

SYNOPSIS
#include <sys/types.h>
#include <sys/capability.h>
int
cap_clear(cap_t cap_p);

DESCRIPTION
The function cap_clear() shall initialize the capability state in working storage identified by cap_p so that all capability flags for all capabilities defined in the implementation shall be cleared.

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 shall be set to indicate the error.

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

[EINVAL]
    The value of the cap_p argument does not refer to a capability state in the working storage. Search permission is denied for a component of the path prefix, or the

SEE ALSO
cap(3), cap_init(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.