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

Technical Reference: Kernel and Subsystems, Volume 1

kcred_getpriv Kernel Service

Purpose

Copies a privilege vector from a credentials structure.

Syntax

#include <sys/priv.h>

#include <sys/cred.h>

int kcred_getpriv ( crp, which, priv )
struct ucred * cr;
int which;
priv_t * priv;

Parameters

crp Pointer to a credentials structure
which Privilege set to get
priv Privilege set

Description

The kcred_getpriv kernel service returns a single privilege set from the credentials structure referenced by crp. The which parameter is one of PRIV_BEQUEATH, PRIV_EFFECTIVE, PRIV_INHERITED, or PRIV_MAXIMUM. The corresponding privilege set will be copied to priv. rp must be a valid, referenced credentials structure.

Execution Environment

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

Return Values

0 Success. to priv.
-1 An error has occurred.

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 ]