Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:valid_master_desc - verify the 'key-type:desc' of a new/updated master-key* key-type:= "trusted:" | "user:"* desc:= master-key description* Verify that 'key-type' is valid and that 'desc' exists. On key update,

Proto:static int valid_master_desc(const char *new_desc, const char *orig_desc)

Type:int

Parameter:

TypeParameterName
const char *new_desc
const char *orig_desc
141  If Not strncmp(new_desc, KEY_TRUSTED_PREFIX, KEY_TRUSTED_PREFIX_LEN) Then prefix_len = KEY_TRUSTED_PREFIX_LEN
143  Else if Not strncmp(new_desc, KEY_USER_PREFIX, KEY_USER_PREFIX_LEN) Then prefix_len = KEY_USER_PREFIX_LEN
145  Else Return -EINVAL
148  If Not new_desc[prefix_len] Then Return -EINVAL
151  If orig_desc && strncmp(new_desc, orig_desc, prefix_len) Then Return -EINVAL
154  Return 0
Caller
NameDescribe
datablob_parsedatablob_parse - parse the keyctl data* datablob format:* new [] * load [] * * update * Tokenizes a copy of the
encrypted_updaterypted_update - update the master key description* Change the master key description for an existing encrypted key.* The next read will return an encrypted datablob using the new* master key description.* On success, return 0. Otherwise return errno.