/linux-3.4.99/security/keys/ |
D | process_keys.c | 337 key_ref_t key_ref, ret, err; in search_my_process_keyrings() local 346 key_ref = NULL; in search_my_process_keyrings() 352 key_ref = keyring_search_aux( in search_my_process_keyrings() 355 if (!IS_ERR(key_ref)) in search_my_process_keyrings() 358 switch (PTR_ERR(key_ref)) { in search_my_process_keyrings() 363 ret = key_ref; in search_my_process_keyrings() 366 err = key_ref; in search_my_process_keyrings() 373 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 | keyctl.c | 60 key_ref_t keyring_ref, key_ref; in SYSCALL_DEFINE5() local 111 key_ref = key_create_or_update(keyring_ref, type, description, in SYSCALL_DEFINE5() 114 if (!IS_ERR(key_ref)) { in SYSCALL_DEFINE5() 115 ret = key_ref_to_ptr(key_ref)->serial; in SYSCALL_DEFINE5() 116 key_ref_put(key_ref); in SYSCALL_DEFINE5() 119 ret = PTR_ERR(key_ref); in SYSCALL_DEFINE5() 240 key_ref_t key_ref; in keyctl_get_keyring_ID() local 245 key_ref = lookup_user_key(id, lflags, KEY_SEARCH); in keyctl_get_keyring_ID() 246 if (IS_ERR(key_ref)) { in keyctl_get_keyring_ID() 247 ret = PTR_ERR(key_ref); in keyctl_get_keyring_ID() [all …]
|
D | key.c | 708 static inline key_ref_t __key_update(key_ref_t key_ref, in __key_update() argument 711 struct key *key = key_ref_to_ptr(key_ref); in __key_update() 715 ret = key_permission(key_ref, KEY_WRITE); in __key_update() 735 return key_ref; in __key_update() 739 key_ref = ERR_PTR(ret); in __key_update() 780 key_ref_t key_ref; in key_create_or_update() local 787 key_ref = ERR_PTR(-ENODEV); in key_create_or_update() 791 key_ref = ERR_PTR(-EINVAL); in key_create_or_update() 799 key_ref = ERR_PTR(-ENOTDIR); in key_create_or_update() 811 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() 73 if (is_key_possessed(key_ref)) in key_task_permission() 82 return security_key_permission(key_ref, cred, perm); in key_task_permission()
|
D | request_key.c | 357 key_ref_t key_ref; in construct_alloc_key() local 384 key_ref = search_process_keyrings(type, description, type->match, cred); in construct_alloc_key() 385 if (!IS_ERR(key_ref)) in construct_alloc_key() 404 key = key_ref_to_ptr(key_ref); in construct_alloc_key() 525 key_ref_t key_ref; in request_key_and_link() local 533 key_ref = search_process_keyrings(type, description, type->match, cred); in request_key_and_link() 535 if (!IS_ERR(key_ref)) { in request_key_and_link() 536 key = key_ref_to_ptr(key_ref); in request_key_and_link() 547 } else if (PTR_ERR(key_ref) != -EAGAIN) { in request_key_and_link() 548 key = ERR_CAST(key_ref); in request_key_and_link()
|
D | internal.h | 158 extern int key_task_permission(const key_ref_t key_ref, 165 static inline int key_permission(const key_ref_t key_ref, key_perm_t perm) in key_permission() argument 167 return key_task_permission(key_ref, current_cred(), perm); in key_permission()
|
D | keyring.c | 320 key_ref_t key_ref; in keyring_search_aux() local 331 key_ref = ERR_PTR(err); in keyring_search_aux() 335 key_ref = ERR_PTR(-ENOTDIR); in keyring_search_aux() 347 key_ref = ERR_PTR(-EAGAIN); in keyring_search_aux() 360 key_ref = ERR_PTR(key->type_data.reject_error); in keyring_search_aux() 368 key_ref = ERR_PTR(-EAGAIN); in keyring_search_aux() 464 key_ref = ERR_PTR(err); in keyring_search_aux() 471 key_ref = make_key_ref(key, possessed); in keyring_search_aux() 475 return key_ref; in keyring_search_aux()
|
D | proc.c | 190 key_ref_t key_ref, skey_ref; in proc_keys_show() local 194 key_ref = make_key_ref(key, 0); in proc_keys_show() 205 key_ref = make_key_ref(key, 1); in proc_keys_show() 214 rc = key_task_permission(key_ref, cred, KEY_VIEW); in proc_keys_show()
|
/linux-3.4.99/include/linux/ |
D | key.h | 106 static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) in key_ref_to_ptr() argument 108 return (struct key *) ((unsigned long) key_ref & ~1UL); in key_ref_to_ptr() 111 static inline unsigned long is_key_possessed(const key_ref_t key_ref) in is_key_possessed() argument 113 return (unsigned long) key_ref & 1UL; in is_key_possessed() 211 static inline void key_ref_put(key_ref_t key_ref) in key_ref_put() argument 213 key_put(key_ref_to_ptr(key_ref)); in key_ref_put()
|
D | security.h | 1644 int (*key_permission) (key_ref_t key_ref, 2905 int security_key_permission(key_ref_t key_ref, 2922 static inline int security_key_permission(key_ref_t key_ref, in security_key_permission() argument
|
/linux-3.4.99/security/ |
D | security.c | 1292 int security_key_permission(key_ref_t key_ref, in security_key_permission() argument 1295 return security_ops->key_permission(key_ref, cred, perm); in security_key_permission()
|
D | capability.c | 833 static int cap_key_permission(key_ref_t key_ref, const struct cred *cred, in cap_key_permission() argument
|
/linux-3.4.99/security/smack/ |
D | smack_lsm.c | 3290 static int smack_key_permission(key_ref_t key_ref, in smack_key_permission() argument 3297 keyp = key_ref_to_ptr(key_ref); in smack_key_permission()
|
/linux-3.4.99/Documentation/security/ |
D | keys.txt | 850 struct key *key_ref_to_ptr(const key_ref_t key_ref); 852 unsigned long is_key_possessed(const key_ref_t key_ref); 937 void key_ref_put(key_ref_t key_ref);
|
/linux-3.4.99/security/selinux/ |
D | hooks.c | 5609 static int selinux_key_permission(key_ref_t key_ref, in selinux_key_permission() argument 5625 key = key_ref_to_ptr(key_ref); in selinux_key_permission()
|