函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\process_keys.c Create Date:2022-07-27 19:56:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Install the given keyring as the session keyring of the given credentials* struct, replacing the existing one if any. If the given keyring is NULL,* then install a new anonymous session keyring.*@cred can not be in use by any task yet.

函数原型:int install_session_keyring_to_cred(struct cred *cred, struct key *keyring)

返回类型:int

参数:

类型参数名称
struct cred *cred
struct key *keyring
322  might_sleep()
325  如果非keyring
326  flags等于add to quota, permit even if overrun
327  如果 keyring inherited over fork flags等于add to quota, reject if would overrun
330  keyring等于Allocate a keyring and link into the destination keyring.
333  如果是错误则返回:错误
335  否则
336  __key_get(keyring)
340  old等于 keyring inherited over fork
341  keyring inherited over fork 等于keyring
343  如果oldkey_put - Discard a reference to a key.*@key: The key to discard a reference from.* Discard a reference to a key, and when all the references are gone, we* schedule the cleanup task to come and pull it out of the tree in process
346  返回:0
调用者
名称描述
install_session_keyringInstall the given keyring as the session keyring of the current task,* replacing the existing one if any. If the given keyring is NULL, then* install a new anonymous session keyring.* Return: 0 on success; -errno on failure.
join_session_keyringJoin the named keyring as the session keyring if possible else attempt to* create a new one of that name and join that
umh_keys_initInitialise a usermode helper that is going to have a specific session* keyring.* This is called in context of freshly forked kthread before kernel_execve(),* so we can simply install the desired session_keyring at this point.