函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Clear the specified keyring, creating an empty process keyring if one of the* special keyring IDs is used.* The keyring must grant the caller Write permission and not have* KEY_FLAG_KEEP set for this to work. If successful, 0 will be returned.

函数原型:long keyctl_keyring_clear(key_serial_t ringid)

返回类型:long

参数:

类型参数名称
key_serial_tringid
474  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
475  如果是错误
476  ret等于错误
479  如果操作权限检查
481  如果是错误则转到:error
486  转到:error_put
489  转到:error
492  clear :
493  keyring等于key_ref_to_ptr(keyring_ref)
494  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting fromret等于负EPERM
496  否则ret等于keyring_clear - Clear a keyring*@keyring: The keyring to clear.* Clear the contents of the specified keyring.* Returns 0 if successful or -ENOTDIR if the keyring isn't a keyring.
498  error_put :
499  key_ref_put(keyring_ref)
500  error :
501  返回:ret
调用者
名称描述
SYSCALL_DEFINE5The key control system call
COMPAT_SYSCALL_DEFINE5The key control system call, 32-bit compatibility version for 64-bit archs