[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, Volume 1

CRED_GETEUID, CRED_GETRUID, CRED_GETSUID, CRED_GETLUID, CRED_GETEGID, CRED_GETRGID, CRED_GETSGID and CRED_GETNGRPS Macros

Purpose

Credentials structure field accessing macros.

Syntax

#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 )

Parameter

crp Pointer to a credentials structure

Description

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>.

Execution Environment

The credentials macros called with any valid credentials pointer.

Related Information

Security Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]