函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Get the persistent keyring for a specific UID and link it to the nominated* keyring.

函数原型:long keyctl_get_persistent(uid_t _uid, key_serial_t destid)

返回类型:long

参数:

类型参数名称
uid_t_uid
key_serial_tdestid
131  ns等于current_user_ns()
137  如果(_uid == (uid_t) - 1)则
138  uid等于current_uid()
139  否则
140  uid等于make_kuid - Map a user-namespace uid pair into a kuid
141  如果非uid_valid(uid)则返回:负EINVAL
147  如果非uid_eq(uid, current_uid())且非uid_eq(uid, current_euid())且非ns_capable(ns, Allows forged pids on socket credentials passing. )则返回:负EPERM
154  dest_ref等于Look up a key ID given us by userspace with a given permissions mask to get* the key it refers to.* Flags can be passed to request that special keyrings be created if referred* to directly, to permit partially constructed keys to be found and to skip
155  如果是错误则返回:错误
157  如果 type of key 不等于key_type_keyring
158  ret等于负ENOTDIR
159  转到:out_put_dest
162  ret等于Get the persistent keyring for a specific UID and link it to the nominated* keyring.
164  out_put_dest :
165  key_ref_put(dest_ref)
166  返回:ret
调用者
名称描述
COMPAT_SYSCALL_DEFINE5The key control system call, 32-bit compatibility version for 64-bit archs