函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\keyring.c Create Date:2022-07-27 19:53:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:int keyring_clear(struct key *keyring)

返回类型:int

参数:

类型参数名称
struct key *keyring
1651  如果 type of key 不等于key_type_keyring则返回:负ENOTDIR
1654  lock for writing
1656  edit等于assoc_array_clear - Script deletion of all objects from an associative array*@array: The array to clear.*@ops: The operations to use.* Precalculate and preallocate a script for the deletion of all the objects* from an associative array
1657  如果是错误
1658  ret等于错误
1659  否则
1660  如果editassoc_array_apply_edit - Apply an edit script to an associative array*@edit: The script to apply.* Apply an edit script to an associative array to effect an insertion,* deletion or clearance. As the edit script includes preallocated memory,
1662  key_payload_reserve - Adjust data quota reservation for the key's payload*@key: The key to make the reservation for
1663  ret等于0
1666  lease a write lock
1667  返回:ret
调用者
名称描述
keyctl_keyring_clearClear 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.