/kernel/ |
D | user.c | 74 #define __uidhashfn(uid) (((uid >> UIDHASH_BITS) + uid) & UIDHASH_MASK) argument 75 #define uidhashentry(uid) (uidhash_table + __uidhashfn((__kuid_val(uid)))) argument 97 .uid = GLOBAL_ROOT_UID, 113 static struct user_struct *uid_hash_find(kuid_t uid, struct hlist_head *hashent) in uid_hash_find() argument 118 if (uid_eq(user->uid, uid)) { in uid_hash_find() 147 struct user_struct *find_user(kuid_t uid) in find_user() argument 153 ret = uid_hash_find(uid, uidhashentry(uid)); in find_user() 172 struct user_struct *alloc_uid(kuid_t uid) in alloc_uid() argument 174 struct hlist_head *hashent = uidhashentry(uid); in alloc_uid() 178 up = uid_hash_find(uid, hashent); in alloc_uid() [all …]
|
D | ucount.c | 18 #define ucounts_hashfn(ns, uid) \ argument 19 hash_long((unsigned long)__kuid_val(uid) + (unsigned long)(ns), \ 21 #define ucounts_hashentry(ns, uid) \ argument 22 (ucounts_hashtable + ucounts_hashfn(ns, uid)) 115 static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, struct hlist_head *hashe… in find_ucounts() argument 120 if (uid_eq(ucounts->uid, uid) && (ucounts->ns == ns)) in find_ucounts() 126 static struct ucounts *get_ucounts(struct user_namespace *ns, kuid_t uid) in get_ucounts() argument 128 struct hlist_head *hashent = ucounts_hashentry(ns, uid); in get_ucounts() 132 ucounts = find_ucounts(ns, uid, hashent); in get_ucounts() 141 new->uid = uid; in get_ucounts() [all …]
|
D | sys.c | 141 if (uid_eq(pcred->uid, cred->euid) || in set_one_prio_perm() 184 kuid_t uid; in SYSCALL_DEFINE3() local 217 uid = make_kuid(cred->user_ns, who); in SYSCALL_DEFINE3() 220 uid = cred->uid; in SYSCALL_DEFINE3() 221 else if (!uid_eq(uid, cred->uid)) { in SYSCALL_DEFINE3() 222 user = find_user(uid); in SYSCALL_DEFINE3() 227 if (uid_eq(task_uid(p), uid) && task_pid_vnr(p)) in SYSCALL_DEFINE3() 230 if (!uid_eq(uid, cred->uid)) in SYSCALL_DEFINE3() 254 kuid_t uid; in SYSCALL_DEFINE2() local 285 uid = make_kuid(cred->user_ns, who); in SYSCALL_DEFINE2() [all …]
|
D | auditsc.c | 311 static int audit_compare_uid(kuid_t uid, in audit_compare_uid() argument 320 rc = audit_uid_comparator(uid, f->op, name->uid); in audit_compare_uid() 327 rc = audit_uid_comparator(uid, f->op, n->uid); in audit_compare_uid() 368 return audit_compare_uid(cred->uid, name, f, ctx); in audit_field_compare() 387 return audit_uid_comparator(cred->uid, f->op, tsk->loginuid); in audit_field_compare() 389 return audit_uid_comparator(cred->uid, f->op, cred->euid); in audit_field_compare() 391 return audit_uid_comparator(cred->uid, f->op, cred->suid); in audit_field_compare() 393 return audit_uid_comparator(cred->uid, f->op, cred->fsuid); in audit_field_compare() 474 result = audit_uid_comparator(cred->uid, f->op, f->uid); in audit_filter_rules() 477 result = audit_uid_comparator(cred->euid, f->op, f->uid); in audit_filter_rules() [all …]
|
D | uid16.c | 49 SYSCALL_DEFINE1(setuid16, old_uid_t, uid) in SYSCALL_DEFINE1() argument 51 return sys_setuid(low2highuid(uid)); in SYSCALL_DEFINE1() 66 ruid = high2lowuid(from_kuid_munged(cred->user_ns, cred->uid)); in SYSCALL_DEFINE3() 101 SYSCALL_DEFINE1(setfsuid16, old_uid_t, uid) in SYSCALL_DEFINE1() argument 103 return sys_setfsuid(low2highuid(uid)); in SYSCALL_DEFINE1()
|
D | user_namespace.c | 34 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces() argument 36 return inc_ucount(ns, uid, UCOUNT_USER_NAMESPACES); in inc_user_namespaces() 285 kuid_t make_kuid(struct user_namespace *ns, uid_t uid) in make_kuid() argument 288 return KUIDT_INIT(map_id_down(&ns->uid_map, uid)); in make_kuid() 331 uid_t uid; in from_kuid_munged() local 332 uid = from_kuid(targ, kuid); in from_kuid_munged() 334 if (uid == (uid_t) -1) in from_kuid_munged() 335 uid = overflowuid; in from_kuid_munged() 336 return uid; in from_kuid_munged() 867 kuid_t uid = make_kuid(ns->parent, id); in new_idmap_permitted() local [all …]
|
D | exit.c | 1012 pid_t pid, uid_t uid, int why, int status) in wait_noreap_copyout() argument 1030 retval = put_user(uid, &infop->si_uid); in wait_noreap_copyout() 1049 uid_t uid = from_kuid_munged(current_user_ns(), task_uid(p)); in wait_task_zombie() local 1070 return wait_noreap_copyout(wo, p, pid, uid, why, status); in wait_task_zombie() 1172 retval = put_user(uid, &infop->si_uid); in wait_task_zombie() 1229 uid_t uid = 0; /* unneeded, required by compiler */ in wait_task_stopped() local 1255 uid = from_kuid_munged(current_user_ns(), task_uid(p)); in wait_task_stopped() 1275 return wait_noreap_copyout(wo, p, pid, uid, why, exit_code); in wait_task_stopped() 1294 retval = put_user(uid, &infop->si_uid); in wait_task_stopped() 1313 uid_t uid; in wait_task_continued() local [all …]
|
D | audit.h | 88 kuid_t uid; member 139 kuid_t uid, euid, suid, fsuid; member 162 kuid_t uid; member
|
D | cred.c | 49 .uid = GLOBAL_ROOT_UID, 473 if (!uid_eq(new->uid, old->uid) || in commit_creds() 740 from_kuid_munged(&init_user_ns, cred->uid), in dump_invalid_creds()
|
D | auditfilter.c | 466 f->uid = make_kuid(current_user_ns(), f->val); in audit_data_to_entry() 467 if (!uid_valid(f->uid)) in audit_data_to_entry() 724 if (!uid_eq(a->fields[i].uid, b->fields[i].uid)) in audit_compare_rule() 1315 result = audit_uid_comparator(current_uid(), f->op, f->uid); in audit_filter() 1322 f->op, f->uid); in audit_filter()
|
D | audit.c | 703 uid_t uid = from_kuid(&init_user_ns, current_uid()); in audit_log_common_recv_msg() local 714 audit_log_format(*ab, "pid=%d uid=%u", pid, uid); in audit_log_common_recv_msg() 1043 sig_data->uid = from_kuid(&init_user_ns, audit_sig_uid); in audit_receive_msg() 1747 name->uid = inode->i_uid; in audit_copy_inode() 1803 from_kuid(&init_user_ns, n->uid), in audit_log_name() 1928 from_kuid(&init_user_ns, cred->uid), in audit_log_task_info()
|
D | signal.c | 708 uid_eq(cred->euid, tcred->uid) || in kill_ok_by_cred() 709 uid_eq(cred->uid, tcred->suid) || in kill_ok_by_cred() 710 uid_eq(cred->uid, tcred->uid)) in kill_ok_by_cred() 1333 if (!uid_eq(cred->euid, pcred->suid) && !uid_eq(cred->euid, pcred->uid) && in kill_as_cred_perm() 1334 !uid_eq(cred->uid, pcred->suid) && !uid_eq(cred->uid, pcred->uid)) in kill_as_cred_perm()
|
D | tsacct.c | 63 stats->ac_uid = from_kuid_munged(user_ns, tcred->uid); in bacct_add_tsk()
|
D | ptrace.c | 305 caller_uid = cred->uid; in __ptrace_may_access() 311 uid_eq(caller_uid, tcred->uid) && in __ptrace_may_access()
|
D | acct.c | 492 ac.ac_uid = from_kuid_munged(file->f_cred->user_ns, orig_cred->uid); in do_acct_process()
|
D | cgroup.c | 2858 !uid_eq(cred->euid, tcred->uid) && in cgroup_procs_write_permission()
|
/kernel/bpf/ |
D | helpers.c | 126 kuid_t uid; in BPF_CALL_0() local 132 current_uid_gid(&uid, &gid); in BPF_CALL_0() 134 from_kuid(&init_user_ns, uid); in BPF_CALL_0()
|
/kernel/trace/ |
D | trace.h | 162 kuid_t uid; member
|
D | trace.c | 1288 max_data->uid = current_uid(); in __update_max_tr() 1290 max_data->uid = task_uid(tsk); in __update_max_tr() 3026 from_kuid_munged(seq_user_ns(m), data->uid), data->nice, in print_trace_header()
|
/kernel/sched/ |
D | core.c | 4158 uid_eq(cred->euid, pcred->uid)); in check_same_owner()
|