Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Read or set the default keyring in which request_key() will cache keys and* return the old setting.* If a thread or process keyring is specified then it will be created if it* doesn't yet exist. The old setting will be returned if successful.

Proto:long keyctl_set_reqkey_keyring(int reqkey_defl)

Type:long

Parameter:

TypeParameterName
intreqkey_defl
1325  old_setting = current_cred_xxx(jit_keyring)
1327  If reqkey_defl == quest-key default keyrings Then Return old_setting
1330  new = prepare_creds - Prepare a new set of credentials for modification* Prepare a new set of task credentials for modification
1331  If Not new Then Return -ENOMEM
1335  Case reqkey_defl == KEY_REQKEY_DEFL_THREAD_KEYRING
1336  ret = Install a thread keyring to the given credentials struct if it didn't have* one already. This is allowed to overrun the quota.* Return: 0 if a thread keyring is now present; -errno on failure.
1337  If ret < 0 Then Go to error
1339  Go to set
1341  Case reqkey_defl == KEY_REQKEY_DEFL_PROCESS_KEYRING
1342  ret = Install a process keyring to the given credentials struct if it didn't have* one already. This is allowed to overrun the quota.* Return: 0 if a process keyring is now present; -errno on failure.
1343  If ret < 0 Then Go to error
1345  Go to set
1347  Case reqkey_defl == KEY_REQKEY_DEFL_DEFAULT
1348  Case reqkey_defl == KEY_REQKEY_DEFL_SESSION_KEYRING
1349  Case reqkey_defl == KEY_REQKEY_DEFL_USER_KEYRING
1350  Case reqkey_defl == KEY_REQKEY_DEFL_USER_SESSION_KEYRING
1351  Case reqkey_defl == KEY_REQKEY_DEFL_REQUESTOR_KEYRING
1352  Go to set
1354  Case reqkey_defl == quest-key default keyrings
1355  Case reqkey_defl == KEY_REQKEY_DEFL_GROUP_KEYRING
1356  Default
1357  ret = -EINVAL
1358  Go to error
1361  set :
1362  default keyring to attach requested * keys to = reqkey_defl
1363  mmit_creds - Install new credentials upon the current task*@new: The credentials to be assigned* Install a new set of credentials to the current task, using RCU to replace* the old set. Both the objective and the subjective credentials pointers are
1364  Return old_setting
1365  error :
1366  abort_creds - Discard a set of credentials and unlock the current task*@new: The credentials that were going to be applied* Discard a set of credentials that were under construction and unlock the* current task.
1367  Return ret
Caller
NameDescribe
SYSCALL_DEFINE5The key control system call
COMPAT_SYSCALL_DEFINE5The key control system call, 32-bit compatibility version for 64-bit archs