Home
last modified time | relevance | path

Searched refs:index_key (Results 1 – 8 of 8) sorted by relevance

/security/keys/
Dkeyring.c171 static unsigned long hash_key_type_and_desc(const struct keyring_index_key *index_key) in hash_key_type_and_desc() argument
175 const char *description = index_key->description; in hash_key_type_and_desc()
179 int n, desc_len = index_key->desc_len; in hash_key_type_and_desc()
181 type = (unsigned long)index_key->type; in hash_key_type_and_desc()
208 if (index_key->type != &key_type_keyring && (hash & fan_mask) == 0) in hash_key_type_and_desc()
210 if (index_key->type == &key_type_keyring && (hash & fan_mask) != 0) in hash_key_type_and_desc()
232 const struct keyring_index_key *index_key = data; in keyring_get_key_chunk() local
235 int desc_len = index_key->desc_len, n = sizeof(chunk); in keyring_get_key_chunk()
240 return hash_key_type_and_desc(index_key); in keyring_get_key_chunk()
242 return ((unsigned long)index_key->type << 8) | desc_len; in keyring_get_key_chunk()
[all …]
Dpersistent.c43 struct keyring_index_key *index_key) in key_create_persistent() argument
54 persistent_ref = find_key_to_update(reg_ref, index_key); in key_create_persistent()
59 persistent = keyring_alloc(index_key->description, in key_create_persistent()
78 struct keyring_index_key index_key; in key_get_persistent() local
85 index_key.type = &key_type_keyring; in key_get_persistent()
86 index_key.description = buf; in key_get_persistent()
87 index_key.desc_len = sprintf(buf, "_persistent.%u", from_kuid(ns, uid)); in key_get_persistent()
92 persistent_ref = find_key_to_update(reg_ref, &index_key); in key_get_persistent()
103 persistent_ref = key_create_persistent(ns, uid, &index_key); in key_get_persistent()
Dkey.c280 key->index_key.desc_len = desclen; in key_alloc()
281 key->index_key.description = kmemdup(desc, desclen + 1, GFP_KERNEL); in key_alloc()
289 key->index_key.type = type; in key_alloc()
497 ret = __key_link_begin(keyring, &key->index_key, &edit); in key_instantiate_and_link()
505 __key_link_end(keyring, &key->index_key, edit); in key_instantiate_and_link()
553 link_ret = __key_link_begin(keyring, &key->index_key, &edit); in key_reject_and_link()
586 __key_link_end(keyring, &key->index_key, edit); in key_reject_and_link()
785 struct keyring_index_key index_key = { in key_create_or_update() local
797 index_key.type = key_type_lookup(type); in key_create_or_update()
798 if (IS_ERR(index_key.type)) { in key_create_or_update()
[all …]
Drequest_key.c366 ctx->index_key.type->name, ctx->index_key.description); in construct_alloc_key()
373 if (ctx->index_key.type->read) in construct_alloc_key()
375 if (ctx->index_key.type == &key_type_keyring || in construct_alloc_key()
376 ctx->index_key.type->update) in construct_alloc_key()
379 key = key_alloc(ctx->index_key.type, ctx->index_key.description, in construct_alloc_key()
388 ret = __key_link_begin(dest_keyring, &ctx->index_key, &edit); in construct_alloc_key()
407 __key_link_end(dest_keyring, &ctx->index_key, edit); in construct_alloc_key()
423 __key_link_end(dest_keyring, &ctx->index_key, edit); in construct_alloc_key()
470 if (ctx->index_key.type == &key_type_keyring) in construct_key_and_link()
545 .index_key.type = type, in request_key_and_link()
[all …]
Dinternal.h92 const struct keyring_index_key *index_key,
97 const struct keyring_index_key *index_key,
101 const struct keyring_index_key *index_key);
111 struct keyring_index_key index_key; member
Drequest_key_auth.c246 .index_key.type = &key_type_request_key_auth, in key_get_instantiation_authkey()
247 .index_key.description = description, in key_get_instantiation_authkey()
Dprocess_keys.c466 ctx->index_key.type != &key_type_request_key_auth in search_process_keyrings()
688 ctx.index_key.type = key->type; in lookup_user_key()
689 ctx.index_key.description = key->description; in lookup_user_key()
690 ctx.index_key.desc_len = strlen(key->description); in lookup_user_key()
Dproc.c194 .index_key.type = key->type, in proc_keys_show()
195 .index_key.description = key->description, in proc_keys_show()