函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\crypto\keyring.c Create Date:2022-07-29 10:57:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static int add_master_key_user(struct fscrypt_master_key *mk)

返回类型:int

参数:

类型参数名称
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  如果是错误则返回:错误
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  返回:err
调用者
名称描述
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