kkeyset_create Kernel Service
Purpose
Creates and initializes a kernel keyset.
Syntax
#include <sys/kerrno.h>
#include <sys/skeys.h>
kerrno_t kkeyset_create (set)
kkeyset_t *set;
kkeyset_t *set;
Parameters
Item | Description |
---|---|
set | Contains the returned newly-created keyset. |
Description
The kkeyset_create kernel service creates a new (empty) kernel keyset. You can add or remove the access to an individual or groups of kernel keys using the kkeyset_add_key, kkeyset_remove_key, kkeyset_add_set, and kkeyset_remove_set kernel services.
Important: The kkeyset_create kernel
service allocates hidden kernel resources. You must release these
resources using the kkeyset_delete kernel service when the
kernel keyset is no longer in use. When creating a new set, the caller
of the kkeyset_create kernel service must initialize the storage
that will contain the returned kernel keyset (*set) to the
value of KKEYSET_INVALID.
Execution Environment
The kkeyset_create kernel service can be called from the process environment only.
Return Values
Item | Description |
---|---|
0 | Indicates a successful completion. |
ENOMEM_KKEYSET_CREATE | Indicates that the available memory is not sufficient to satisfy the request. |
EINVAL_KKEYSET_CREATE | Indicates that the parameter or execution environment is not valid. |