Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\keyctl.c Create Date:2022-07-28 18:20:25
Last Modify:2020-03-18 07:59:52 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Get the destination keyring for instantiation and check that the caller has* Write permission on it.

Proto:static long get_instantiation_keyring(key_serial_t ringid, struct request_key_auth *rka, struct key **_dest_keyring)

Type:long

Parameter:

TypeParameterName
key_serial_tringid
struct request_key_auth *rka
struct key **_dest_keyring
1042  * _dest_keyring = NULL
1045  If ringid == 0 Then Return 0
1049  If ringid > 0 Then
1050  dkref = 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
1051  If IS_ERR(dkref) Then Return PTR_ERR(dkref)
1053  _dest_keyring = key_ref_to_ptr(dkref)
1054  Return 0
1057  If ringid == - key ID for assumed request_key auth key Then Return -EINVAL
1062  If ringid >= - key ID for request_key() dest keyring Then
1063  _dest_keyring = key_get(dest_keyring)
1064  Return 0
1067  Return -ENOKEY
Caller
NameDescribe
keyctl_instantiate_key_commonInstantiate a key with the specified payload and link the key into the* destination keyring if one is given.* The caller must have the appropriate instantiation permit set for this to* work (see keyctl_assume_authority). No other permissions are required.
keyctl_reject_keyNegatively instantiate the key with the given timeout (in seconds) and error* code and link the key into the destination keyring if one is given.* The caller must have the appropriate instantiation permit set for this to