Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Create the persistent keyring for the specified user.* Called with the namespace's sem locked for writing.

Proto:static key_ref_t key_create_persistent(struct user_namespace *ns, kuid_t uid, struct keyring_index_key *index_key)

Type:key_ref_t

Parameter:

TypeParameterName
struct user_namespace *ns
kuid_tuid
struct keyring_index_key *index_key
46  If Not Register of per-UID persistent keyrings for this namespace Then
47  err = Create the persistent keyring register for the current user namespace.* Called with the namespace's sem locked for writing.
48  If err < 0 Then Return ERR_PTR(err)
50  Else
51  reg_ref = make_key_ref( Register of per-UID persistent keyrings for this namespace , true)
52  persistent_ref = Search the given keyring for a key that might be updated.* The caller must guarantee that the keyring is a keyring and that the* permission is granted to modify the keyring as no check is made here. The
53  If persistent_ref Then Return persistent_ref
57  persistent = Allocate a keyring and link into the destination keyring.
63  If IS_ERR(persistent) Then Return ERR_CAST - Explicitly cast an error-valued pointer to another pointer type*@ptr: The pointer to cast.* Explicitly cast an error-valued pointer to another pointer type in such a* way as to make it clear that's what's going on.
66  Return make_key_ref(persistent, true)
Caller
NameDescribe
key_get_persistentGet the persistent keyring for a specific UID and link it to the nominated* keyring.