Credentials structure field accessing macros.
#include <sys/cred.h>
uid_t CRED_GETEUID ( crp )
uid_t CRED_GETRUID ( crp )
uid_t CRED_GETSUID ( crp )
uid_t CRED_GETLUID ( crp )
gid_t CRED_GETEGID ( crp )
gid_t CRED_GETRGID ( crp )
gid_t CRED_GETSGID ( crp )
int CRED_GETNGRPS ( crp )
Item | Description |
---|---|
crp | Pointer to a credentials structure |
These macros provide a means for accessing the user and group identifier fields within a credentials structure. The fields within a ucred structure should not be accessed directly as the field names and their locations are subject to change.
The CRED_GETEUID macro returns the effective user ID field from the credentials structure referenced by crp.
The CRED_GETRUID macro returns the real user ID field from the credentials structure referenced by crp.
The CRED_GETSUID macro returns the saved user ID field from the credentials structure referenced by crp.
The CRED_GETLUID macro returns the login user ID field from the credentials structure referenced by crp.
The CRED_GETEUID macro returns the effective group ID field from the credentials structure referenced by crp.
The CRED_GETRUID macro returns the real group ID field from the credentials structure referenced by crp.
The CRED_GETSUID macro returns the saved group ID field from the credentials structure referenced by crp.
The CRED_GETNGRPS macro returns the number of concurrent group ID values stored within the credentials structure referenced by crp.
These macros are defined in the system header file <sys/cred.h>.
The credentials macros called with any valid credentials pointer.