Allocates a new, uninitialized credentials structure to a new one and frees the old one.
#include <sys/cred.h>
struct ucred * crget ( void )
This kernel service does not require any parameters.
The crget kernel service allocates a new credentials structure. The structure is initialized to all zero values, and the reference count is set to 1.
The crget kernel service can be called from the process environment only.
Item | Description |
---|---|
Nonzero value | A pointer to a newly allocated and initialized credentials structure. |
Zero value | An error occurred when the kernel service was attempting to allocate pinned memory for the credentials structure. |