Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\keyring.c Create Date:2022-07-28 18:18:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:int keyring_clear(struct key *keyring)

Type:int

Parameter:

TypeParameterName
struct key *keyring
1651  If type of key != key_type_keyring Then Return -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  If IS_ERR(edit) Then
1658  ret = PTR_ERR(edit)
1659  Else
1660  If edit Then assoc_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  Return ret
Caller
NameDescribe
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.