Lines Matching refs:type

224 struct key *key_alloc(struct key_type *type, const char *desc,  in key_alloc()  argument
239 if (type->vet_description) { in key_alloc()
240 ret = type->vet_description(desc); in key_alloc()
248 quotalen = desclen + 1 + type->def_datalen; in key_alloc()
285 key->index_key.type = type; in key_alloc()
290 lockdep_set_class(&key->sem, &type->lock_class); in key_alloc()
293 key->datalen = type->def_datalen; in key_alloc()
446 ret = key->type->instantiate(key, prep); in __key_instantiate_and_link()
513 prep.quotalen = key->type->def_datalen; in key_instantiate_and_link()
515 if (key->type->preparse) { in key_instantiate_and_link()
516 ret = key->type->preparse(&prep); in key_instantiate_and_link()
533 ret = keyres->check(keyring, key->type, &prep.payload, in key_instantiate_and_link()
547 if (key->type->preparse) in key_instantiate_and_link()
548 key->type->free_preparse(&prep); in key_instantiate_and_link()
716 struct key_type *key_type_lookup(const char *type) in key_type_lookup() argument
725 if (strcmp(ktype->name, type) == 0) in key_type_lookup()
777 if (!key->type->update) in __key_update()
782 ret = key->type->update(key, prep); in __key_update()
807 const char *type, in __key_create_or_update() argument
828 index_key.type = key_type_lookup(type); in __key_create_or_update()
829 if (IS_ERR(index_key.type)) { in __key_create_or_update()
835 if (!index_key.type->instantiate || in __key_create_or_update()
836 (!index_key.description && !index_key.type->preparse)) in __key_create_or_update()
847 if (keyring->type != &key_type_keyring) in __key_create_or_update()
854 prep.quotalen = index_key.type->def_datalen; in __key_create_or_update()
856 if (index_key.type->preparse) { in __key_create_or_update()
857 ret = index_key.type->preparse(&prep); in __key_create_or_update()
884 ret = restrict_link->check(keyring, index_key.type, in __key_create_or_update()
905 if (index_key.type->update) { in __key_create_or_update()
924 if (index_key.type->read) in __key_create_or_update()
927 if (index_key.type == &key_type_keyring || in __key_create_or_update()
928 index_key.type->update) in __key_create_or_update()
933 key = key_alloc(index_key.type, index_key.description, in __key_create_or_update()
956 if (index_key.type->preparse) in __key_create_or_update()
957 index_key.type->free_preparse(&prep); in __key_create_or_update()
959 key_type_put(index_key.type); in __key_create_or_update()
1014 const char *type, in key_create_or_update() argument
1021 return __key_create_or_update(keyring_ref, type, description, payload, in key_create_or_update()
1051 const char *type, in key_create() argument
1058 return __key_create_or_update(keyring_ref, type, description, payload, in key_create()
1090 if (!key->type->update) in key_update()
1096 prep.quotalen = key->type->def_datalen; in key_update()
1098 if (key->type->preparse) { in key_update()
1099 ret = key->type->preparse(&prep); in key_update()
1106 ret = key->type->update(key, &prep); in key_update()
1116 if (key->type->preparse) in key_update()
1117 key->type->free_preparse(&prep); in key_update()
1145 if (key->type->revoke) in key_revoke()
1146 key->type->revoke(key); in key_revoke()