Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:key_validate - Validate a key.*@key: The key to be validated.* Check that a key is valid, returning 0 if the key is okay, -ENOKEY if the* key is invalidated, -EKEYREVOKED if the key's type has been removed or if

Proto:int key_validate(const struct key *key)

Type:int

Parameter:

TypeParameterName
const struct key *key
87  flags = READ_ONCE( status flags (change with bitops) )
88  expiry = READ_ONCE( time at which key expires (or 0) )
90  If flags & 1 << set if key has been invalidated Then Return -ENOKEY
94  If flags & ( 1 << set if key had been revoked | 1 << set if key type has been deleted ) Then Return -EKEYREVOKED
99  If expiry Then
100  If ktime_get_real_seconds - Get the seconds portion of CLOCK_REALTIME* Returns the wall clock seconds since 1970. This replaces the* get_seconds() interface which is not y2038 safe on 32bit systems. >= expiry Then Return -EKEYEXPIRED
104  Return 0
Caller
NameDescribe
search_process_keyrings_rcuSearch the process keyrings attached to the supplied cred for the first* matching key in the manner of search_my_process_keyrings(), but also search* the keys attached to the assumed authorisation key using its credentials if* one is available.
lookup_user_keyLook 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
call_sbin_request_keyRequest userspace finish the construction of a key* - execute "/sbin/request-key "
wait_for_key_constructionwait_for_key_construction - Wait for construction of a key to complete*@key: The key being waited for
dh_data_from_key