Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:long keyctl_keyring_clear(key_serial_t ringid)

Type:long

Parameter:

TypeParameterName
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  If IS_ERR(keyring_ref) Then
476  ret = PTR_ERR(keyring_ref)
481  If IS_ERR(keyring_ref) Then Go to error
486  Go to error_put
489  Go to error
492  clear :
493  keyring = key_ref_to_ptr(keyring_ref)
494  If st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from Then ret = -EPERM
496  Else 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  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