NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ATTRIBUTES | SEE ALSO
#include <cx/cred.h>int acred(const KnCap *cactorcap, cx_cred_t *oldCred, const cx_cred_t *newCred);
ACTOR_EXTENDED_MNGT
If oldCred is not the NULL pointer, a copy of the credential structure of the c_actor designated by its capability cactorcap will be copied at the location pointed to by oldCred.
If newCred is not the NULL pointer, the credentials of the c_actor designated by its capability cactorcap will be set to the value of the credentials pointed to by newCred.
A structure cx_cred_t includes the following members:
uid_t cr_uid; /* c_actor's user ID */ gid_t cr_gid; /* c_actor's group ID */ unsigned short cr_ngroups; /* number of groups in cr_groups */ gid_t cr_groups[]; /* supplementary group list */
Upon successful completion, acred returns 0; otherwise it returns the following error conditions:
cactorcap doesn't designate a valid c_actor.
newCred is not the NULL pointer and the caller is not a trusted c_actor.
cactorcap, oldCred or newCred points outside the allocated address space of the calling c_actor.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ATTRIBUTES | SEE ALSO