Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kmod.h>
#include <linux/err.h>
#include <linux/keyctl.h>
#include <linux/slab.h>
#include "internal.h"
Go to the source code of this file.
Macros | |
#define | key_negative_timeout 60 /* default timeout on a negative key's existence */ |
Definition at line 22 of file request_key.c.
complete_request_key - Complete the construction of a key. : The key construction record. : The success or failute of the construction.
Complete the attempt to construct a key. The key will be negated if an error is indicated. The authorisation key will be revoked unconditionally.
Definition at line 51 of file request_key.c.
EXPORT_SYMBOL | ( | complete_request_key | ) |
EXPORT_SYMBOL | ( | wait_for_key_construction | ) |
EXPORT_SYMBOL | ( | request_key | ) |
EXPORT_SYMBOL | ( | request_key_with_auxdata | ) |
EXPORT_SYMBOL | ( | request_key_async | ) |
EXPORT_SYMBOL | ( | request_key_async_with_auxdata | ) |
|
read |
request_key - Request a key and wait for construction : Type of key. : The searchable description of the key. : The data to pass to the instantiation upcall (or NULL).
As for request_key_and_link() except that it does not add the returned key to a keyring if found, new keys are always allocated in the user's quota, the callout_info must be a NUL-terminated string and no auxiliary data can be passed.
Furthermore, it then works as wait_for_key_construction() to wait for the completion of keys undergoing construction with a non-interruptible wait.
Definition at line 599 of file request_key.c.
|
read |
request_key_and_link - Request a key and cache it in a keyring. : The type of key we want. : The searchable description of the key. : The data to pass to the instantiation upcall (or NULL). : The length of callout_info. : Auxiliary data for the upcall. : Where to cache the key. : Flags to key_alloc().
A key matching the specified criteria is searched for in the process's keyrings and returned with its usage count incremented if found. Otherwise, if callout_info is not NULL, a key will be allocated and some service (probably in userspace) will be asked to instantiate it.
If successfully found or created, the key will be linked to the destination keyring if one is provided.
Returns a pointer to the key if successful; -EACCES, -ENOKEY, -EKEYREVOKED or -EKEYEXPIRED if an inaccessible, negative, revoked or expired key was found; -ENOKEY if no key was found and no was given; -EDQUOT if insufficient key quota was available to create a new key; or -ENOMEM if insufficient memory was available.
If the returned key was created, then it may still be under construction, and wait_for_key_construction() should be used to wait for that to complete.
Definition at line 508 of file request_key.c.
|
read |
Definition at line 672 of file request_key.c.
|
read |
Definition at line 697 of file request_key.c.
|
read |
request_key_with_auxdata - Request a key with auxiliary data for the upcaller : The type of key we want. : The searchable description of the key. : The data to pass to the instantiation upcall (or NULL). : The length of callout_info. : Auxiliary data for the upcall.
As for request_key_and_link() except that it does not add the returned key to a keyring if found and new keys are always allocated in the user's quota.
Furthermore, it then works as wait_for_key_construction() to wait for the completion of keys undergoing construction with a non-interruptible wait.
Definition at line 636 of file request_key.c.
wait_for_key_construction - Wait for construction of a key to complete : The key being waited for. : Whether to wait interruptibly.
Wait for a key to finish being constructed.
Returns 0 if successful; -ERESTARTSYS if the wait was interrupted; -ENOKEY if the key was negated; or -EKEYREVOKED or -EKEYEXPIRED if the key was revoked or expired.
Definition at line 570 of file request_key.c.