/security/keys/ |
D | persistent.c | 40 static key_ref_t key_create_persistent(struct user_namespace *ns, kuid_t uid, in key_create_persistent() argument 58 uid, INVALID_GID, current_cred(), in key_create_persistent() 73 static long key_get_persistent(struct user_namespace *ns, kuid_t uid, in key_get_persistent() argument 86 index_key.desc_len = sprintf(buf, "_persistent.%u", from_kuid(ns, uid)); in key_get_persistent() 103 persistent_ref = key_create_persistent(ns, uid, &index_key); in key_get_persistent() 133 kuid_t uid; in keyctl_get_persistent() local 138 uid = current_uid(); in keyctl_get_persistent() 140 uid = make_kuid(ns, _uid); in keyctl_get_persistent() 141 if (!uid_valid(uid)) in keyctl_get_persistent() 147 if (!uid_eq(uid, current_uid()) && in keyctl_get_persistent() [all …]
|
D | process_keys.c | 32 .uid = GLOBAL_ROOT_UID, 82 uid_t uid = from_kuid(user_ns, cred->user->uid); in look_up_user_keyrings() local 88 kenter("%u", uid); in look_up_user_keyrings() 101 snprintf(buf, sizeof(buf), "_uid.%u", uid); in look_up_user_keyrings() 106 uid_keyring = keyring_alloc(buf, cred->user->uid, INVALID_GID, in look_up_user_keyrings() 123 snprintf(buf, sizeof(buf), "_uid_ses.%u", uid); in look_up_user_keyrings() 128 session_keyring = keyring_alloc(buf, cred->user->uid, INVALID_GID, in look_up_user_keyrings() 206 cred->user->uid)); in get_user_session_keyring_rcu() 228 keyring = keyring_alloc("_tid", new->uid, new->gid, new, in install_thread_keyring_to_cred() 275 keyring = keyring_alloc("_pid", new->uid, new->gid, new, in install_process_keyring_to_cred() [all …]
|
D | proc.c | 71 if (kuid_has_mapping(user_ns, key->user->uid)) in key_serial_next() 103 if (kuid_has_mapping(user_ns, minkey->user->uid)) in find_ge_key() 238 from_kuid_munged(seq_user_ns(m), key->uid), in proc_keys_show() 256 if (kuid_has_mapping(user_ns, user->uid)) in __key_user_next() 307 unsigned maxkeys = uid_eq(user->uid, GLOBAL_ROOT_UID) ? in proc_key_users_show() 309 unsigned maxbytes = uid_eq(user->uid, GLOBAL_ROOT_UID) ? in proc_key_users_show() 313 from_kuid_munged(seq_user_ns(m), user->uid), in proc_key_users_show()
|
D | key.c | 50 struct key_user *key_user_lookup(kuid_t uid) in key_user_lookup() argument 65 if (uid_lt(uid, user->uid)) in key_user_lookup() 67 else if (uid_gt(uid, user->uid)) in key_user_lookup() 95 candidate->uid = uid; in key_user_lookup() 225 kuid_t uid, kgid_t gid, const struct cred *cred, in key_alloc() argument 250 user = key_user_lookup(uid); in key_alloc() 257 unsigned maxkeys = uid_eq(uid, GLOBAL_ROOT_UID) ? in key_alloc() 259 unsigned maxbytes = uid_eq(uid, GLOBAL_ROOT_UID) ? in key_alloc() 293 key->uid = uid; in key_alloc() 380 unsigned maxbytes = uid_eq(key->user->uid, GLOBAL_ROOT_UID) ? in key_payload_reserve()
|
D | keyctl.c | 680 from_kuid_munged(current_user_ns(), key->uid), in keyctl_describe_key() 952 kuid_t uid; in keyctl_chown_key() local 955 uid = make_kuid(current_user_ns(), user); in keyctl_chown_key() 958 if ((user != (uid_t) -1) && !uid_valid(uid)) in keyctl_chown_key() 984 if (user != (uid_t) -1 && !uid_eq(key->uid, uid)) in keyctl_chown_key() 997 if (user != (uid_t) -1 && !uid_eq(uid, key->uid)) { in keyctl_chown_key() 999 newowner = key_user_lookup(uid); in keyctl_chown_key() 1005 unsigned maxkeys = uid_eq(uid, GLOBAL_ROOT_UID) ? in keyctl_chown_key() 1007 unsigned maxbytes = uid_eq(uid, GLOBAL_ROOT_UID) ? in keyctl_chown_key() 1037 key->uid = uid; in keyctl_chown_key() [all …]
|
D | internal.h | 60 kuid_t uid; member 69 extern struct key_user *key_user_lookup(kuid_t uid); 258 static inline long keyctl_get_persistent(uid_t uid, key_serial_t destring) in keyctl_get_persistent() argument
|
D | permission.c | 36 if (uid_eq(key->uid, cred->fsuid)) { in key_task_permission()
|
D | keyring.c | 517 struct key *keyring_alloc(const char *description, kuid_t uid, kgid_t gid, in keyring_alloc() argument 527 uid, gid, cred, perm, flags, restrict_link); in keyring_alloc() 1153 if (!kuid_has_mapping(ns, keyring->user->uid)) in find_keyring_by_name()
|
/security/safesetid/ |
D | lsm.c | 84 if (setuid_policy_lookup(cred->uid, INVALID_UID) == SIDPOL_DEFAULT) in safesetid_security_capable() 92 __kuid_val(cred->uid)); in safesetid_security_capable() 105 if (uid_eq(new_uid, old->uid) || uid_eq(new_uid, old->euid) || in uid_permitted_for_cred() 114 setuid_policy_lookup(old->uid, new_uid) != SIDPOL_CONSTRAINED; in uid_permitted_for_cred() 117 __kuid_val(old->uid), __kuid_val(old->euid), in uid_permitted_for_cred() 134 if (setuid_policy_lookup(old->uid, INVALID_UID) == SIDPOL_DEFAULT) in safesetid_task_fix_setuid() 137 if (uid_permitted_for_cred(old, new->uid) && in safesetid_task_fix_setuid()
|
/security/ |
D | commoncap.c | 715 static inline bool __is_real(kuid_t uid, struct cred *cred) in __is_real() argument 716 { return uid_eq(cred->uid, uid); } in __is_real() 718 static inline bool __is_eff(kuid_t uid, struct cred *cred) in __is_eff() argument 719 { return uid_eq(cred->euid, uid); } in __is_eff() 721 static inline bool __is_suid(kuid_t uid, struct cred *cred) in __is_suid() argument 722 { return !__is_real(uid, cred) && __is_eff(uid, cred); } in __is_suid() 778 { return !uid_eq(new->euid, old->uid); } in __is_setuid() 867 new->euid = new->uid; in cap_bprm_set_creds() 1025 if ((uid_eq(old->uid, root_uid) || in cap_emulate_setxuid() 1028 (!uid_eq(new->uid, root_uid) && in cap_emulate_setxuid()
|
D | security.c | 1111 int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) in security_path_chown() argument 1115 return call_int_hook(path_chown, 0, path, uid, gid); in security_path_chown()
|
/security/integrity/ima/ |
D | ima_policy.c | 71 kuid_t uid; member 120 .uid = GLOBAL_ROOT_UID, .uid_op = &uid_eq, 132 .uid = GLOBAL_ROOT_UID, .uid_op = &uid_eq, 135 .uid = GLOBAL_ROOT_UID, .uid_op = &uid_eq, 400 if ((rule->flags & IMA_UID) && !rule->uid_op(cred->uid, rule->uid)) in ima_match_rules() 404 if (!rule->uid_op(cred->euid, rule->uid) in ima_match_rules() 405 && !rule->uid_op(cred->suid, rule->uid) in ima_match_rules() 406 && !rule->uid_op(cred->uid, rule->uid)) in ima_match_rules() 408 } else if (!rule->uid_op(cred->euid, rule->uid)) in ima_match_rules() 927 entry->uid = INVALID_UID; in ima_parse_rule() [all …]
|
/security/apparmor/ |
D | file.c | 179 NULL, NULL, cond->uid, info, error)); in path_name() 234 if (uid_eq(current_fsuid(), cond->uid)) { in aa_compute_fperms() 289 cond->uid, NULL, e); in __aa_path_perm() 443 NULL, cond->uid, info, error); in profile_path_link() 515 .uid = file_inode(file)->i_uid, in __file_path_perm()
|
D | domain.c | 734 cond->uid, info, error); in profile_transition() 810 NULL, onexec, cond->uid, info, error); in profile_onexec()
|
D | lsm.c | 264 cond.uid = inode->i_uid; in common_perm_rm() 382 static int apparmor_path_chown(const struct path *path, kuid_t uid, kgid_t gid) in apparmor_path_chown() argument
|
/security/tomoyo/ |
D | tomoyo.c | 361 static int tomoyo_path_chown(const struct path *path, kuid_t uid, kgid_t gid) in tomoyo_path_chown() argument 365 if (uid_valid(uid)) in tomoyo_path_chown() 367 from_kuid(&init_user_ns, uid)); in tomoyo_path_chown()
|
D | audit.c | 200 from_kuid(&init_user_ns, stat->uid), in tomoyo_print_header() 209 from_kuid(&init_user_ns, stat->uid), in tomoyo_print_header()
|
D | condition.c | 742 stat->uid = inode->i_uid; in tomoyo_get_attributes() 999 value = from_kuid(&init_user_ns, stat->uid); in tomoyo_condition()
|
D | common.h | 568 kuid_t uid; member
|
D | common.c | 948 (!uid_eq(task->cred->uid, GLOBAL_ROOT_UID) || in tomoyo_manager()
|
/security/integrity/ |
D | integrity_audit.c | 43 from_kuid(&init_user_ns, current_cred()->uid), in integrity_audit_msg()
|
/security/integrity/evm/ |
D | evm_crypto.c | 148 uid_t uid; in hmac_add_misc() member 169 hmac_misc.uid = from_kuid(&init_user_ns, inode->i_uid); in hmac_add_misc()
|
/security/apparmor/include/ |
D | file.h | 105 kuid_t uid; member
|