CAP_GET_PROC(3)

NAME
cap_get_proc - Obtain the Current Process Capability State

SYNOPSIS
#include <sys/types.h>
#include <sys/capability.h>
cap_t
cap_get_proc(void);

DESCRIPTION
The function cap_get_proc() shall allocate a capability state in working storage, set its state to that of the calling process, and return a pointer to the newly created capability state.

This function may cause memory to be allocated. The caller should free any releasable memory, when the capability state in the working storage is no longer required, by calling cap_free() with the cap_t as an argument.

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

RETURN VALUES
Upon successful completion, this function shall return a cap_t value. Otherwise, a value of NULL shall be returned and errno shall be set to indicate the error.

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

[ENOMEM]
    The capability state to be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints.

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