crget Kernel Service

Purpose

Allocates a new, uninitialized credentials structure to a new one and frees the old one.

Syntax

 

#include <sys/cred.h>

struct ucred * crget ( void )

Parameter

This kernel service does not require any parameters.

Description

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.

Execution Environment

The crget kernel service can be called from the process environment only.

Return Values

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.