Copies a process authentication group ID into a credentials structure.
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.
Item | Description |
---|---|
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. |
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.
Item | Description |
---|---|
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. |