Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Revoke a key.* The key must be grant the caller Write or Setattr permission for this to* work. The key type should give up its quota claim when revoked. The key* and any links to the key will be automatically garbage collected after a

Proto:long keyctl_revoke_key(key_serial_t id)

Type:long

Parameter:

TypeParameterName
key_serial_tid
386  key_ref = 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
387  If IS_ERR(key_ref) Then
388  ret = PTR_ERR(key_ref)
389  If ret != -EACCES Then Go to error
391  key_ref = 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
392  If IS_ERR(key_ref) Then
393  ret = PTR_ERR(key_ref)
394  Go to error
398  key = key_ref_to_ptr(key_ref)
399  ret = 0
400  If st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then ret = -EPERM
402  Else key_revoke - Revoke a key
405  key_ref_put(key_ref)
406  error :
407  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