Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\key.c Create Date:2022-07-28 18:16:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Find and lock the specified key type against removal.* We return with the sem read-locked if successful. If the type wasn't* available -ENOKEY is returned instead.

Proto:struct key_type *key_type_lookup(const char *type)

Type:struct key_type

Parameter:

TypeParameterName
const char *type
701  lock for reading
706  If strcmp(ame of the type , type) == 0 Then Go to found_kernel_type
710  lease a read lock
711  ktype = ERR_PTR( - ENOKEY)
713  found_kernel_type :
714  Return ktype
Caller
NameDescribe
key_create_or_updatekey_create_or_update - Update or create and instantiate a key.*@keyring_ref: A pointer to the destination keyring with possession flag.*@type: The type of key.*@description: The searchable description for the key.
keyring_restrictkeyring_restrict - Look up and apply a restriction to a keyring*@keyring_ref: The keyring to be restricted*@type: The key type that will provide the restriction checker.*@restriction: The restriction options to apply to the keyring
SYSCALL_DEFINE4Search the process keyrings and keyring trees linked from those for a* matching key. Keyrings must have appropriate Search permission to be* searched.* If a key is found, it will be attached to the destination keyring if there's
keyctl_keyring_searchSearch the specified keyring and any keyrings it links to for a matching* key