Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\crypto\keyring.c Create Date:2022-07-28 20:23:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Give the current user a "key" in ->mk_users. This charges the user's quota* and marks the master key as added by the current user, so that it cannot be* removed by another user with the key. Either the master key's key->sem must

Proto:static int add_master_key_user(struct fscrypt_master_key *mk)

Type:int

Parameter:

TypeParameterName
struct fscrypt_master_key *mk
287  format_mk_user_description(description, identifier)
288  mk_user = key_alloc( & Type of key in ->mk_users. Each key of this type represents a particular* user who has added a particular master key.* Note that the name of this key type really should be something like* ", description, current_fsuid(), current_gid(), current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.(), possessor can find a key in search / search a keyring | user permissions... , 0, NULL)
291  If IS_ERR(mk_user) Then Return PTR_ERR(mk_user)
294  err = key_instantiate_and_link(mk_user, NULL, 0, Keyring which contains a key of type 'key_type_fscrypt_user' for each* user who has added this key, NULL)
295  key_put(mk_user)
296  Return err
Caller
NameDescribe
add_new_master_keyAllocate a new fscrypt_master_key which contains the given secret, set it as* the payload of a new 'struct key' of type fscrypt, and link the 'struct key'* into the given keyring. Synchronized by fscrypt_add_key_mutex.
add_existing_master_key