[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Kernel and Subsystems, Volume 1
kcred_setpagname Kernel Service
Purpose
Copies a process authentication group ID into a credentials structure.
Syntax
int kcred_setpagname (name, flags, func)
char *name;
int flags;
Description
The kcred_setpagname kernel service registers the
name of a PAG and returns the PAG type identifier. If the PAG name has already
been registered, the previously returned PAG type identifier is returned if
the flags and func parameters
match their earlier values.
Parameters
name |
The name parameter is a 1 to
4 character, NULL-terminated name for the PAG type. Typical values might include
"afs", "dfs", "pki" and "krb5." |
flags |
The flags parameter indicates
if each PAG value is unique (PAG_UNIQUEVALUE) or multivalued (PAG_MULTIVALUED).
A multivalued PAG type allows multiple calls to the kcred_setpag kernel service to be made to store multiple values for a single PAG
type. |
func |
The func parameter is a pointer
to an allocating and deallocating function. The flag parameter
to that function is either PAGVALUE_ALLOC or PAGVALUE_FREE. The value parameter is the actual PAG value. The func parameter will be invoked by the crfree kernel
service with a flag value of PAGVALUE_FREE on the last free value of a credential.
Whenever a credentials structure is initialized with new PAG values, func will be invoked by that function with a value of PAGVALUE_ALLOC.
This parameter may be ignored and an error returned if the value of func is non-NULL. |
Return Values
A value of 0 or greater is returned upon successful completion. This value
is the PAG type identifier which is used with other kernel services, such
as the kcred_getpag and kcred_setpag subroutines . A negative value is returned if unsuccessful.
Error Codes
ENOSPC |
The PAG table is full. |
EEXISTS |
The named PAG type already exists in the table and the flags and func parameters do not
match their earlier values. |
EINVAL |
The flags parameter is an invalid
value. |
Related Information
__pag_getid System Call, __pag_getname System Call, __pag_getvalue System Call, __pag_setname System Call, __pag_setvalue System Call, kcred_getpagid Kernel Service,
and kcred_getpagname Kernel Service.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]