Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Find a keyring with the specified name

Proto:struct key *find_keyring_by_name(const char *name, bool uid_keyring)

Type:struct key

Parameter:

TypeParameterName
const char *name
booluid_keyring
1145  ns = current_user_ns()
1148  If Not name Then Return ERR_PTR( - EINVAL)
1151  read_lock( & keyring_name_lock)
1157  If Not kuid_has_mapping(ns, uid) Then Continue
1160  If st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then Continue
1163  If strcmp(description, name) != 0 Then Continue
1166  If uid_keyring Then
1167  If Not st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then Continue
1170  Else
1171  If Check to see whether permission is granted to use a key in the desired way. < 0 Then Continue
1179  If Not _inc_not_zero - increment a refcount unless it is 0*@r: the refcount to increment* Similar to atomic_inc_not_zero(), but will saturate at REFCOUNT_SATURATED* and WARN.* Provides no memory ordering, it is assumed the caller has guaranteed the Then Continue
1181  last time used for LRU keyring discard = ktime_get_real_seconds - Get the seconds portion of CLOCK_REALTIME* Returns the wall clock seconds since 1970. This replaces the* get_seconds() interface which is not y2038 safe on 32bit systems.
1182  Go to out
1185  keyring = ERR_PTR( - ENOKEY)
1186  out :
1187  read_unlock( & keyring_name_lock)
1188  Return keyring
Caller
NameDescribe
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