Home
last modified time | relevance | path

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

/security/keys/
Dkeyctl.c69 key_ref_t keyring_ref, key_ref; in SYSCALL_DEFINE5() local
123 key_ref = key_create_or_update(keyring_ref, type, description, in SYSCALL_DEFINE5()
126 if (!IS_ERR(key_ref)) { in SYSCALL_DEFINE5()
127 ret = key_ref_to_ptr(key_ref)->serial; in SYSCALL_DEFINE5()
128 key_ref_put(key_ref); in SYSCALL_DEFINE5()
131 ret = PTR_ERR(key_ref); in SYSCALL_DEFINE5()
252 key_ref_t key_ref; in keyctl_get_keyring_ID() local
257 key_ref = lookup_user_key(id, lflags, KEY_NEED_SEARCH); in keyctl_get_keyring_ID()
258 if (IS_ERR(key_ref)) { in keyctl_get_keyring_ID()
259 ret = PTR_ERR(key_ref); in keyctl_get_keyring_ID()
[all …]
Dprocess_keys.c342 key_ref_t key_ref, ret, err; in search_my_process_keyrings() local
351 key_ref = NULL; in search_my_process_keyrings()
357 key_ref = keyring_search_aux( in search_my_process_keyrings()
359 if (!IS_ERR(key_ref)) in search_my_process_keyrings()
362 switch (PTR_ERR(key_ref)) { in search_my_process_keyrings()
365 ret = key_ref; in search_my_process_keyrings()
368 err = key_ref; in search_my_process_keyrings()
375 key_ref = keyring_search_aux( in search_my_process_keyrings()
377 if (!IS_ERR(key_ref)) in search_my_process_keyrings()
380 switch (PTR_ERR(key_ref)) { in search_my_process_keyrings()
[all …]
Dkey.c746 static inline key_ref_t __key_update(key_ref_t key_ref, in __key_update() argument
749 struct key *key = key_ref_to_ptr(key_ref); in __key_update()
753 ret = key_permission(key_ref, KEY_NEED_WRITE); in __key_update()
773 return key_ref; in __key_update()
777 key_ref = ERR_PTR(ret); in __key_update()
821 key_ref_t key_ref; in key_create_or_update() local
829 key_ref = ERR_PTR(-ENODEV); in key_create_or_update()
833 key_ref = ERR_PTR(-EINVAL); in key_create_or_update()
842 key_ref = ERR_PTR(-EPERM); in key_create_or_update()
846 key_ref = ERR_PTR(-ENOTDIR); in key_create_or_update()
[all …]
Dpermission.c30 int key_task_permission(const key_ref_t key_ref, const struct cred *cred, in key_task_permission() argument
37 key = key_ref_to_ptr(key_ref); in key_task_permission()
68 if (is_key_possessed(key_ref)) in key_task_permission()
77 return security_key_permission(key_ref, cred, perm); in key_task_permission()
Drequest_key.c349 key_ref_t key_ref; in construct_alloc_key() local
385 key_ref = search_process_keyrings(ctx); in construct_alloc_key()
386 if (!IS_ERR(key_ref)) in construct_alloc_key()
405 key = key_ref_to_ptr(key_ref); in construct_alloc_key()
543 key_ref_t key_ref; in request_key_and_link() local
559 key_ref = search_process_keyrings(&ctx); in request_key_and_link()
561 if (!IS_ERR(key_ref)) { in request_key_and_link()
562 key = key_ref_to_ptr(key_ref); in request_key_and_link()
573 } else if (PTR_ERR(key_ref) != -EAGAIN) { in request_key_and_link()
574 key = ERR_CAST(key_ref); in request_key_and_link()
Dproc.c185 key_ref_t key_ref, skey_ref; in proc_keys_show() local
199 key_ref = make_key_ref(key, 0); in proc_keys_show()
208 key_ref = make_key_ref(key, 1); in proc_keys_show()
213 rc = key_task_permission(key_ref, ctx.cred, KEY_NEED_VIEW); in proc_keys_show()
Ddh.c24 key_ref_t key_ref; in dh_data_from_key() local
28 key_ref = lookup_user_key(keyid, 0, KEY_NEED_READ); in dh_data_from_key()
29 if (IS_ERR(key_ref)) { in dh_data_from_key()
34 key = key_ref_to_ptr(key_ref); in dh_data_from_key()
Dinternal.h179 extern int key_task_permission(const key_ref_t key_ref,
186 static inline int key_permission(const key_ref_t key_ref, unsigned perm) in key_permission() argument
188 return key_task_permission(key_ref, current_cred(), perm); in key_permission()
/security/
Dsecurity.c1679 int security_key_permission(key_ref_t key_ref, in security_key_permission() argument
1682 return call_int_hook(key_permission, 0, key_ref, cred, perm); in security_key_permission()
/security/smack/
Dsmack_lsm.c4353 static int smack_key_permission(key_ref_t key_ref, in smack_key_permission() argument
4368 keyp = key_ref_to_ptr(key_ref); in smack_key_permission()
/security/selinux/
Dhooks.c6203 static int selinux_key_permission(key_ref_t key_ref, in selinux_key_permission() argument
6219 key = key_ref_to_ptr(key_ref); in selinux_key_permission()