函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\keyctl.c Create Date:2022-07-27 19:54:28
Last Modify:2020-03-18 07:59:52 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Unlink a key from a keyring.* The keyring must grant the caller Write permission for this to work; the key* itself need not grant the caller anything. If the last link to a key is* removed then that key will be scheduled for destruction.

函数原型:long keyctl_keyring_unlink(key_serial_t id, key_serial_t ringid)

返回类型:long

参数:

类型参数名称
key_serial_tid
key_serial_tringid
558  keyring_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
559  如果是错误
560  ret等于错误
561  转到:error
564  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
565  如果是错误
566  ret等于错误
567  转到:error2
570  keyring等于key_ref_to_ptr(keyring_ref)
571  key等于key_ref_to_ptr(key_ref)
572  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting fromst_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting fromret等于负EPERM
575  否则ret等于key_unlink - Unlink the first link to a key from a keyring
578  key_ref_put(key_ref)
579  error2 :
580  key_ref_put(keyring_ref)
581  error :
582  返回:ret
调用者
名称描述
SYSCALL_DEFINE5The key control system call
COMPAT_SYSCALL_DEFINE5The key control system call, 32-bit compatibility version for 64-bit archs