cap_acquire(3C)
cap_acquire, cap_surrender - make permitted set capabilities effective or remove effective capabilities
As shipped in IRIX 6.5.15. Unchanged since IRIX 6.5.
NAME cap_acquire, cap_surrender - make permitted set capabilities effective or remove effective capabilities SYNOPSIS #include <sys/capability.h> cap_t cap_acquire( int ncap, const cap_value_t *caps); void cap_surrender( cap_t cap); DESCRIPTION cap_acquire activates the capabilities from the permitted set of the process by making each of them active in the effective set for the process. cap_surrender sets the effective set to the capabilities specified in the cap argument, and deallocates this structure. RETURN VALUES cap_acquire returns the previous effective set, or NULL if there were errors. NULL may also be returned if the process has no current capability set. This return value has been allocated by the library, and should be freed when no longer needed, most commonly by calling cap_surrender to revert the effective set to its prior value. cap_free(3c) may also be called directly to deallocate the structure. cap_surrender has no return value. ERRORS cap_acquire: EINVAL caps is null. ENOSYS capabilities are not enabled. SEE ALSO cap_free(3c), capabilities(4).