Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Negatively 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

Proto:long keyctl_reject_key(key_serial_t id, unsigned timeout, unsigned error, key_serial_t ringid)

Type:long

Parameter:

TypeParameterName
key_serial_tid
unsignedtimeout
unsignederror
key_serial_tringid
1265  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.()
1270  kenter("%d,%u,%u,%d", id, timeout, error, ringid)
1273  If error <= 0 || error >= Kernel pointers have redundant information, so we can use a* scheme where we can return either an error code or a normal* pointer with the same return value.* This should be a per-architecture thing, to allow different* error and pointer decisions. || error == These should never be seen by user programs. To return one of ERESTART** codes, signal_pending() MUST be set. Note that ptrace can observe these* at syscall exit tracing, but they will never be left for the debugged user* process to see. || error == ERESTARTNOINTR || error == start if no handler.. || error == start by calling sys_restart_syscall Then Return -EINVAL
1283  ret = -EPERM
1284  instkey = assumed request_key authority
1285  If Not instkey Then Go to error
1288  rka = data[0]
1289  If key serial number != id Then Go to error
1294  ret = Get the destination keyring for instantiation and check that the caller has* Write permission on it.
1295  If ret < 0 Then Go to error
1299  ret = key_reject_and_link - Negatively instantiate a key and link it into the keyring.*@key: The key to instantiate.*@timeout: The timeout on the negative key.*@error: The error to return when the key is hit.
1302  key_put - Discard a reference to a key.*@key: The key to discard a reference from.* Discard a reference to a key, and when all the references are gone, we* schedule the cleanup task to come and pull it out of the tree in process
1306  If ret == 0 Then Change the request_key authorisation key on the current process.
1309  error :
1310  Return ret
Caller
NameDescribe
keyctl_negate_keyNegatively instantiate the key with the given timeout (in seconds) 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)
SYSCALL_DEFINE5The key control system call
COMPAT_SYSCALL_DEFINE5The key control system call, 32-bit compatibility version for 64-bit archs