crref Kernel Service

Purpose

Increments the reference count for the current credentials structure.

Syntax

 

#include <sys/cred.h>

 

struct ucred * crref ( void )

Parameter

This kernel service does not require any parameters.

Description

The crref kernel service increments the reference count of the current credentials structure and returns a pointer to the current credentials structure to the invoker.

Note: References that are allocated with the crref kernel service must be released with the crfree kernel service.

Execution Environment

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

Return Values

Item Description
Nonzero value A pointer to the current credentials structure.