Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Get the appropriate destination keyring for the request.* The keyring selected is returned with an extra reference upon it which the* caller must release.

Proto:static int construct_get_dest_keyring(struct key **_dest_keyring)

Type:int

Parameter:

TypeParameterName
struct key **_dest_keyring
265  cred = current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.()
266  dest_keyring = _dest_keyring
269  kenter("%p", dest_keyring)
272  If dest_keyring Then
274  key_get(dest_keyring)
275  Else
276  bool do_perm_check = true
281  Case default keyring to attach requested * keys to == KEY_REQKEY_DEFL_DEFAULT
301  If dest_keyring Then Break
307  If dest_keyring Then Break
314  If dest_keyring Then Break
320  If ret < 0 Then Return ret
322  Break
326  If ret < 0 Then Return ret
328  Break
330  Case default keyring to attach requested * keys to == KEY_REQKEY_DEFL_GROUP_KEYRING
331  Default
332  BUG()
344  If dest_keyring && do_perm_check Then
347  If ret Then
354  _dest_keyring = dest_keyring
355  kleave(" [dk %d]", key_serial(dest_keyring))
356  Return 0
Caller
NameDescribe
construct_key_and_linkCommence key construction.