Copies a capability vector from a credentials structure.
#include <sys/capabilities.h>
#include <sys/cred.h>
int kcred_getcap ( crp, cap )
struct ucred * cr;
struct __cap_t * cap;
Item | Description |
---|---|
crp | Pointer to a credentials structure |
cap | Capabilities set |
The kcred_getcap kernel service copies the capability set from the credentials structure referenced by crp into cap. crp must be a valid, referenced credentials structure.
The kcred_getcap kernel service can be called from the process environment only.
Item | Description |
---|---|
0 | Success. |
-1 | An error has occurred. |