/Linux-v4.19/security/keys/ |
D | keyctl.c | 68 key_ref_t keyring_ref, key_ref; in SYSCALL_DEFINE5() local 122 key_ref = key_create_or_update(keyring_ref, type, description, in SYSCALL_DEFINE5() 125 if (!IS_ERR(key_ref)) { in SYSCALL_DEFINE5() 126 ret = key_ref_to_ptr(key_ref)->serial; in SYSCALL_DEFINE5() 127 key_ref_put(key_ref); in SYSCALL_DEFINE5() 130 ret = PTR_ERR(key_ref); in SYSCALL_DEFINE5() 251 key_ref_t key_ref; in keyctl_get_keyring_ID() local 256 key_ref = lookup_user_key(id, lflags, KEY_NEED_SEARCH); in keyctl_get_keyring_ID() 257 if (IS_ERR(key_ref)) { in keyctl_get_keyring_ID() 258 ret = PTR_ERR(key_ref); in keyctl_get_keyring_ID() [all …]
|
D | process_keys.c | 341 key_ref_t key_ref, ret, err; in search_my_process_keyrings() local 350 key_ref = NULL; in search_my_process_keyrings() 356 key_ref = keyring_search_aux( in search_my_process_keyrings() 358 if (!IS_ERR(key_ref)) in search_my_process_keyrings() 361 switch (PTR_ERR(key_ref)) { in search_my_process_keyrings() 364 ret = key_ref; in search_my_process_keyrings() 367 err = key_ref; in search_my_process_keyrings() 374 key_ref = keyring_search_aux( in search_my_process_keyrings() 376 if (!IS_ERR(key_ref)) in search_my_process_keyrings() 379 switch (PTR_ERR(key_ref)) { in search_my_process_keyrings() [all …]
|
D | key.c | 740 static inline key_ref_t __key_update(key_ref_t key_ref, in __key_update() argument 743 struct key *key = key_ref_to_ptr(key_ref); in __key_update() 747 ret = key_permission(key_ref, KEY_NEED_WRITE); in __key_update() 767 return key_ref; in __key_update() 771 key_ref = ERR_PTR(ret); in __key_update() 815 key_ref_t key_ref; in key_create_or_update() local 823 key_ref = ERR_PTR(-ENODEV); in key_create_or_update() 827 key_ref = ERR_PTR(-EINVAL); in key_create_or_update() 839 key_ref = ERR_PTR(-ENOTDIR); in key_create_or_update() 851 key_ref = ERR_PTR(ret); in key_create_or_update() [all …]
|
D | permission.c | 30 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()
|
D | request_key.c | 363 key_ref_t key_ref; in construct_alloc_key() local 399 key_ref = search_process_keyrings(ctx); in construct_alloc_key() 400 if (!IS_ERR(key_ref)) in construct_alloc_key() 419 key = key_ref_to_ptr(key_ref); in construct_alloc_key() 556 key_ref_t key_ref; in request_key_and_link() local 572 key_ref = search_process_keyrings(&ctx); in request_key_and_link() 574 if (!IS_ERR(key_ref)) { in request_key_and_link() 575 key = key_ref_to_ptr(key_ref); in request_key_and_link() 584 } else if (PTR_ERR(key_ref) != -EAGAIN) { in request_key_and_link() 585 key = ERR_CAST(key_ref); in request_key_and_link()
|
D | proc.c | 161 key_ref_t key_ref, skey_ref; in proc_keys_show() local 178 key_ref = make_key_ref(key, 0); in proc_keys_show() 187 key_ref = make_key_ref(key, 1); in proc_keys_show() 192 rc = key_task_permission(key_ref, ctx.cred, KEY_NEED_VIEW); in proc_keys_show()
|
D | dh.c | 24 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()
|
D | internal.h | 179 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()
|
/Linux-v4.19/include/linux/ |
D | key.h | 121 static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) in key_ref_to_ptr() argument 123 return (struct key *) ((unsigned long) key_ref & ~1UL); in key_ref_to_ptr() 126 static inline bool is_key_possessed(const key_ref_t key_ref) in is_key_possessed() argument 128 return (unsigned long) key_ref & 1UL; in is_key_possessed() 268 static inline void key_ref_put(key_ref_t key_ref) in key_ref_put() argument 270 key_put(key_ref_to_ptr(key_ref)); in key_ref_put()
|
D | security.h | 1667 int security_key_permission(key_ref_t key_ref, 1684 static inline int security_key_permission(key_ref_t key_ref, in security_key_permission() argument
|
D | lsm_hooks.h | 1756 int (*key_permission)(key_ref_t key_ref, const struct cred *cred,
|
/Linux-v4.19/security/ |
D | security.c | 1731 int security_key_permission(key_ref_t key_ref, in security_key_permission() argument 1734 return call_int_hook(key_permission, 0, key_ref, cred, perm); in security_key_permission()
|
/Linux-v4.19/security/smack/ |
D | smack_lsm.c | 4320 static int smack_key_permission(key_ref_t key_ref, in smack_key_permission() argument 4329 keyp = key_ref_to_ptr(key_ref); in smack_key_permission()
|
/Linux-v4.19/Documentation/security/keys/ |
D | core.rst | 933 struct key *key_ref_to_ptr(const key_ref_t key_ref); 935 bool is_key_possessed(const key_ref_t key_ref); 1020 void key_ref_put(key_ref_t key_ref);
|
/Linux-v4.19/security/selinux/ |
D | hooks.c | 6652 static int selinux_key_permission(key_ref_t key_ref, in selinux_key_permission() argument 6668 key = key_ref_to_ptr(key_ref); in selinux_key_permission()
|