cap_acquire, cap_surrender - make permitted set capabilities effective
or remove effective capabilities
cap_t cap_acquire( int ncap, const cap_value_t *caps);
void cap_surrender( cap_t cap);
cap_acquire activates the capabilities from the permitted set of the
process by making each of them active in the effective set for the
cap_surrender sets the effective set to the capabilities specified in the
cap argument, and deallocates this structure.
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.
EINVAL caps is null.
ENOSYS capabilities are not enabled.
PPPPaaaaggggeeee 1111 [ Back ]