CAP_FREE(3)

NAME
cap_free - Release Memory Allocated to a Capability State in Working Storage

SYNOPSIS
#include <sys/types.h>
#include <sys/capability.h>
int
cap_free(void *obj_d);

DESCRIPTION
The function cap_free() shall free any releasable memory currently allocated to the capability state in working storage identified by obj_d. The obj_d argument may identify either a cap_t entity, or a char * entity allocated by the cap_to_text() function.

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_free() 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_dup(3), cap_from_text(3), cap_get_fd(3), cap_get_file(3), cap_get_proc(3), cap_init(3), cap_to_text(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.