Home
last modified time | relevance | path

Searched refs:key_ref (Results 1 – 12 of 12) sorted by relevance

/security/keys/
Dkeyctl.c78 key_ref_t keyring_ref, key_ref; in SYSCALL_DEFINE5() local
132 key_ref = key_create_or_update(keyring_ref, type, description, in SYSCALL_DEFINE5()
135 if (!IS_ERR(key_ref)) { in SYSCALL_DEFINE5()
136 ret = key_ref_to_ptr(key_ref)->serial; in SYSCALL_DEFINE5()
137 key_ref_put(key_ref); in SYSCALL_DEFINE5()
140 ret = PTR_ERR(key_ref); in SYSCALL_DEFINE5()
261 key_ref_t key_ref; in keyctl_get_keyring_ID() local
266 key_ref = lookup_user_key(id, lflags, KEY_NEED_SEARCH); in keyctl_get_keyring_ID()
267 if (IS_ERR(key_ref)) { in keyctl_get_keyring_ID()
268 ret = PTR_ERR(key_ref); in keyctl_get_keyring_ID()
[all …]
Dprocess_keys.c425 key_ref_t key_ref, ret, err; in search_cred_keyrings_rcu() local
435 key_ref = NULL; in search_cred_keyrings_rcu()
441 key_ref = keyring_search_rcu( in search_cred_keyrings_rcu()
443 if (!IS_ERR(key_ref)) in search_cred_keyrings_rcu()
446 switch (PTR_ERR(key_ref)) { in search_cred_keyrings_rcu()
449 ret = key_ref; in search_cred_keyrings_rcu()
452 err = key_ref; in search_cred_keyrings_rcu()
459 key_ref = keyring_search_rcu( in search_cred_keyrings_rcu()
461 if (!IS_ERR(key_ref)) in search_cred_keyrings_rcu()
464 switch (PTR_ERR(key_ref)) { in search_cred_keyrings_rcu()
[all …]
Dkey.c748 static inline key_ref_t __key_update(key_ref_t key_ref, in __key_update() argument
751 struct key *key = key_ref_to_ptr(key_ref); in __key_update()
755 ret = key_permission(key_ref, KEY_NEED_WRITE); in __key_update()
775 return key_ref; in __key_update()
779 key_ref = ERR_PTR(ret); in __key_update()
823 key_ref_t key_ref; in key_create_or_update() local
831 key_ref = ERR_PTR(-ENODEV); in key_create_or_update()
835 key_ref = ERR_PTR(-EINVAL); in key_create_or_update()
847 key_ref = ERR_PTR(-ENOTDIR); in key_create_or_update()
859 key_ref = ERR_PTR(ret); in key_create_or_update()
[all …]
Drequest_key.c375 key_ref_t key_ref; in construct_alloc_key() local
415 key_ref = search_process_keyrings_rcu(ctx); in construct_alloc_key()
417 if (!IS_ERR(key_ref)) in construct_alloc_key()
436 key = key_ref_to_ptr(key_ref); in construct_alloc_key()
581 key_ref_t key_ref; in request_key_and_link() local
602 key_ref = search_process_keyrings_rcu(&ctx); in request_key_and_link()
605 if (!IS_ERR(key_ref)) { in request_key_and_link()
607 ret = key_task_permission(key_ref, current_cred(), in request_key_and_link()
610 key_ref_put(key_ref); in request_key_and_link()
616 key = key_ref_to_ptr(key_ref); in request_key_and_link()
[all …]
Dpermission.c26 int key_task_permission(const key_ref_t key_ref, const struct cred *cred, in key_task_permission() argument
33 key = key_ref_to_ptr(key_ref); in key_task_permission()
64 if (is_key_possessed(key_ref)) in key_task_permission()
73 return security_key_permission(key_ref, cred, perm); in key_task_permission()
Dkeyctl_pkey.c82 key_ref_t key_ref; in keyctl_pkey_params_get() local
98 key_ref = lookup_user_key(id, 0, KEY_NEED_SEARCH); in keyctl_pkey_params_get()
99 if (IS_ERR(key_ref)) in keyctl_pkey_params_get()
100 return PTR_ERR(key_ref); in keyctl_pkey_params_get()
101 params->key = key_ref_to_ptr(key_ref); in keyctl_pkey_params_get()
Dproc.c156 key_ref_t key_ref, skey_ref; in proc_keys_show() local
173 key_ref = make_key_ref(key, 0); in proc_keys_show()
184 key_ref = make_key_ref(key, 1); in proc_keys_show()
189 rc = key_task_permission(key_ref, ctx.cred, KEY_NEED_VIEW); in proc_keys_show()
Ddh.c20 key_ref_t key_ref; in dh_data_from_key() local
24 key_ref = lookup_user_key(keyid, 0, KEY_NEED_READ); in dh_data_from_key()
25 if (IS_ERR(key_ref)) { in dh_data_from_key()
30 key = key_ref_to_ptr(key_ref); in dh_data_from_key()
Dinternal.h180 extern int key_task_permission(const key_ref_t key_ref,
187 static inline int key_permission(const key_ref_t key_ref, unsigned perm) in key_permission() argument
189 return key_task_permission(key_ref, current_cred(), perm); in key_permission()
/security/
Dsecurity.c2335 int security_key_permission(key_ref_t key_ref, in security_key_permission() argument
2338 return call_int_hook(key_permission, 0, key_ref, cred, perm); in security_key_permission()
/security/smack/
Dsmack_lsm.c4248 static int smack_key_permission(key_ref_t key_ref, in smack_key_permission() argument
4263 keyp = key_ref_to_ptr(key_ref); in smack_key_permission()
/security/selinux/
Dhooks.c6549 static int selinux_key_permission(key_ref_t key_ref, in selinux_key_permission() argument
6565 key = key_ref_to_ptr(key_ref); in selinux_key_permission()