Function report |
Source Code:fs\crypto\keysetup_v1.c |
Create Date:2022-07-28 20:24:09 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Search the current task's subscribed keyrings for a "logon" key with* description prefix:descriptor, and if found acquire a read lock on it and* return a pointer to its validated payload in *payload_ret.
Proto:static struct key *find_and_lock_process_key(const char *prefix, const u8 descriptor[8], unsigned int min_keysize, const struct fscrypt_key **payload_ret)
Type:struct key
Parameter:
Type | Parameter | Name |
---|---|---|
const char * | prefix | |
const u8 | descriptor | |
unsigned int | min_keysize | |
const struct fscrypt_key ** | payload_ret |
102 | description = kasprintf(GFP_NOFS, "%s%*phN", prefix, FSCRYPT_KEY_DESCRIPTOR_SIZE, descriptor) |
104 | If Not description Then Return ERR_PTR( - ENOMEM) |
108 | kfree(description) |
112 | lock for reading |
113 | ukp = user_key_payload_locked(key) |
118 | payload = actual data |
120 | If length of this data != sizeof(structfscrypt_key) || size < 1 || size > FSCRYPT_MAX_KEY_SIZE Then |
122 | fscrypt_warn(NULL, "key with description '%s' has invalid payload", description) |
125 | Go to invalid |
128 | If size < min_keysize Then |
129 | fscrypt_warn(NULL, "key with description '%s' is too short (got %u bytes, need %u+ bytes)", description, size, min_keysize) |
132 | Go to invalid |
135 | payload_ret = payload |
136 | Return key |
138 | invalid : |
Name | Describe |
---|---|
fscrypt_setup_v1_file_key_via_subscribed_keyrings |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |