Lines Matching refs:keyring
426 struct key *keyring, in __key_instantiate_and_link() argument
433 key_check(keyring); in __key_instantiate_and_link()
455 if (keyring) { in __key_instantiate_and_link()
456 if (test_bit(KEY_FLAG_KEEP, &keyring->flags)) in __key_instantiate_and_link()
459 __key_link(keyring, key, _edit); in __key_instantiate_and_link()
501 struct key *keyring, in key_instantiate_and_link() argument
520 if (keyring) { in key_instantiate_and_link()
521 ret = __key_link_lock(keyring, &key->index_key); in key_instantiate_and_link()
525 ret = __key_link_begin(keyring, &key->index_key, &edit); in key_instantiate_and_link()
529 if (keyring->restrict_link && keyring->restrict_link->check) { in key_instantiate_and_link()
530 struct key_restriction *keyres = keyring->restrict_link; in key_instantiate_and_link()
532 ret = keyres->check(keyring, key->type, &prep.payload, in key_instantiate_and_link()
539 ret = __key_instantiate_and_link(key, &prep, keyring, authkey, &edit); in key_instantiate_and_link()
542 if (keyring) in key_instantiate_and_link()
543 __key_link_end(keyring, &key->index_key, edit); in key_instantiate_and_link()
577 struct key *keyring, in key_reject_and_link() argument
584 key_check(keyring); in key_reject_and_link()
589 if (keyring) { in key_reject_and_link()
590 if (keyring->restrict_link) in key_reject_and_link()
593 link_ret = __key_link_lock(keyring, &key->index_key); in key_reject_and_link()
595 link_ret = __key_link_begin(keyring, &key->index_key, &edit); in key_reject_and_link()
597 __key_link_end(keyring, &key->index_key, edit); in key_reject_and_link()
618 if (keyring && link_ret == 0) in key_reject_and_link()
619 __key_link(keyring, key, &edit); in key_reject_and_link()
628 if (keyring && link_ret == 0) in key_reject_and_link()
629 __key_link_end(keyring, &key->index_key, edit); in key_reject_and_link()
830 struct key *keyring, *key = NULL; in key_create_or_update() local
848 keyring = key_ref_to_ptr(keyring_ref); in key_create_or_update()
850 key_check(keyring); in key_create_or_update()
853 restrict_link = keyring->restrict_link; in key_create_or_update()
856 if (keyring->type != &key_type_keyring) in key_create_or_update()
880 ret = __key_link_lock(keyring, &index_key); in key_create_or_update()
886 ret = __key_link_begin(keyring, &index_key, &edit); in key_create_or_update()
893 ret = restrict_link->check(keyring, index_key.type, in key_create_or_update()
941 ret = __key_instantiate_and_link(key, &prep, keyring, NULL, &edit); in key_create_or_update()
948 ima_post_key_create_or_update(keyring, key, payload, plen, in key_create_or_update()
954 __key_link_end(keyring, &index_key, edit); in key_create_or_update()
967 __key_link_end(keyring, &index_key, edit); in key_create_or_update()
982 ima_post_key_create_or_update(keyring, key, in key_create_or_update()