/linux-4.1.27/security/keys/ |
D | keyctl.c | 66 key_ref_t keyring_ref, key_ref; in SYSCALL_DEFINE5() local 128 key_ref = key_create_or_update(keyring_ref, type, description, in SYSCALL_DEFINE5() 131 if (!IS_ERR(key_ref)) { in SYSCALL_DEFINE5() 132 ret = key_ref_to_ptr(key_ref)->serial; in SYSCALL_DEFINE5() 133 key_ref_put(key_ref); in SYSCALL_DEFINE5() 136 ret = PTR_ERR(key_ref); in SYSCALL_DEFINE5() 257 key_ref_t key_ref; in keyctl_get_keyring_ID() local 262 key_ref = lookup_user_key(id, lflags, KEY_NEED_SEARCH); in keyctl_get_keyring_ID() 263 if (IS_ERR(key_ref)) { in keyctl_get_keyring_ID() 264 ret = PTR_ERR(key_ref); in keyctl_get_keyring_ID() [all …]
|
D | process_keys.c | 324 key_ref_t key_ref, ret, err; in search_my_process_keyrings() local 333 key_ref = NULL; in search_my_process_keyrings() 339 key_ref = keyring_search_aux( in search_my_process_keyrings() 341 if (!IS_ERR(key_ref)) in search_my_process_keyrings() 344 switch (PTR_ERR(key_ref)) { in search_my_process_keyrings() 347 ret = key_ref; in search_my_process_keyrings() 350 err = key_ref; 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() [all …]
|
D | key.c | 713 static inline key_ref_t __key_update(key_ref_t key_ref, in __key_update() argument 716 struct key *key = key_ref_to_ptr(key_ref); in __key_update() 720 ret = key_permission(key_ref, KEY_NEED_WRITE); in __key_update() 740 return key_ref; in __key_update() 744 key_ref = ERR_PTR(ret); in __key_update() 788 key_ref_t key_ref; in key_create_or_update() local 795 key_ref = ERR_PTR(-ENODEV); in key_create_or_update() 799 key_ref = ERR_PTR(-EINVAL); in key_create_or_update() 808 key_ref = ERR_PTR(-ENOTDIR); in key_create_or_update() 821 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 | 339 key_ref_t key_ref; in construct_alloc_key() local 375 key_ref = search_process_keyrings(ctx); in construct_alloc_key() 376 if (!IS_ERR(key_ref)) in construct_alloc_key() 395 key = key_ref_to_ptr(key_ref); in construct_alloc_key() 524 key_ref_t key_ref; in request_key_and_link() local 540 key_ref = search_process_keyrings(&ctx); in request_key_and_link() 542 if (!IS_ERR(key_ref)) { in request_key_and_link() 543 key = key_ref_to_ptr(key_ref); in request_key_and_link() 554 } else if (PTR_ERR(key_ref) != -EAGAIN) { in request_key_and_link() 555 key = ERR_CAST(key_ref); in request_key_and_link()
|
D | proc.c | 183 key_ref_t key_ref, skey_ref; in proc_keys_show() local 197 key_ref = make_key_ref(key, 0); in proc_keys_show() 206 key_ref = make_key_ref(key, 1); in proc_keys_show() 215 rc = key_task_permission(key_ref, ctx.cred, KEY_NEED_VIEW); in proc_keys_show()
|
D | internal.h | 172 extern int key_task_permission(const key_ref_t key_ref, 179 static inline int key_permission(const key_ref_t key_ref, unsigned perm) in key_permission() argument 181 return key_task_permission(key_ref, current_cred(), perm); in key_permission()
|
/linux-4.1.27/include/linux/ |
D | key.h | 114 static inline struct key *key_ref_to_ptr(const key_ref_t key_ref) in key_ref_to_ptr() argument 116 return (struct key *) ((unsigned long) key_ref & ~1UL); in key_ref_to_ptr() 119 static inline bool is_key_possessed(const key_ref_t key_ref) in is_key_possessed() argument 121 return (unsigned long) key_ref & 1UL; in is_key_possessed() 242 static inline void key_ref_put(key_ref_t key_ref) in key_ref_put() argument 244 key_put(key_ref_to_ptr(key_ref)); in key_ref_put()
|
D | security.h | 1745 int (*key_permission) (key_ref_t key_ref, 3102 int security_key_permission(key_ref_t key_ref, 3119 static inline int security_key_permission(key_ref_t key_ref, in security_key_permission() argument
|
/linux-4.1.27/security/ |
D | security.c | 1455 int security_key_permission(key_ref_t key_ref, in security_key_permission() argument 1458 return security_ops->key_permission(key_ref, cred, perm); in security_key_permission()
|
D | capability.c | 904 static int cap_key_permission(key_ref_t key_ref, const struct cred *cred, in cap_key_permission() argument
|
/linux-4.1.27/security/smack/ |
D | smack_lsm.c | 4000 static int smack_key_permission(key_ref_t key_ref, in smack_key_permission() argument 4009 keyp = key_ref_to_ptr(key_ref); in smack_key_permission()
|
/linux-4.1.27/Documentation/security/ |
D | keys.txt | 868 struct key *key_ref_to_ptr(const key_ref_t key_ref); 870 bool is_key_possessed(const key_ref_t key_ref); 955 void key_ref_put(key_ref_t key_ref);
|
/linux-4.1.27/security/selinux/ |
D | hooks.c | 5807 static int selinux_key_permission(key_ref_t key_ref, in selinux_key_permission() argument 5823 key = key_ref_to_ptr(key_ref); in selinux_key_permission()
|