/kernel/ |
D | nsproxy.c | 64 struct task_struct *tsk, struct user_namespace *user_ns, in create_new_namespaces() argument 74 new_nsp->mnt_ns = copy_mnt_ns(flags, tsk->nsproxy->mnt_ns, user_ns, new_fs); in create_new_namespaces() 80 new_nsp->uts_ns = copy_utsname(flags, user_ns, tsk->nsproxy->uts_ns); in create_new_namespaces() 86 new_nsp->ipc_ns = copy_ipcs(flags, user_ns, tsk->nsproxy->ipc_ns); in create_new_namespaces() 93 copy_pid_ns(flags, user_ns, tsk->nsproxy->pid_ns_for_children); in create_new_namespaces() 99 new_nsp->cgroup_ns = copy_cgroup_ns(flags, user_ns, in create_new_namespaces() 106 new_nsp->net_ns = copy_net_ns(flags, user_ns, tsk->nsproxy->net_ns); in create_new_namespaces() 140 struct user_namespace *user_ns = task_cred_xxx(tsk, user_ns); in copy_namespaces() local 150 if (!ns_capable(user_ns, CAP_SYS_ADMIN)) in copy_namespaces() 164 new_ns = create_new_namespaces(flags, tsk, user_ns, tsk->fs); in copy_namespaces() [all …]
|
D | utsname.c | 45 static struct uts_namespace *clone_uts_ns(struct user_namespace *user_ns, in clone_uts_ns() argument 53 ucounts = inc_uts_namespaces(user_ns); in clone_uts_ns() 71 ns->user_ns = get_user_ns(user_ns); in clone_uts_ns() 90 struct user_namespace *user_ns, struct uts_namespace *old_ns) in copy_utsname() argument 100 new_ns = clone_uts_ns(user_ns, old_ns); in copy_utsname() 112 put_user_ns(ns->user_ns); in free_uts_ns() 147 if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN) || in utsns_install() 159 return to_uts_ns(ns)->user_ns; in utsns_owner()
|
D | uid16.c | 66 ruid = high2lowuid(from_kuid_munged(cred->user_ns, cred->uid)); in SYSCALL_DEFINE3() 67 euid = high2lowuid(from_kuid_munged(cred->user_ns, cred->euid)); in SYSCALL_DEFINE3() 68 suid = high2lowuid(from_kuid_munged(cred->user_ns, cred->suid)); in SYSCALL_DEFINE3() 90 rgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->gid)); in SYSCALL_DEFINE3() 91 egid = high2lowgid(from_kgid_munged(cred->user_ns, cred->egid)); in SYSCALL_DEFINE3() 92 sgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->sgid)); in SYSCALL_DEFINE3() 114 struct user_namespace *user_ns = current_user_ns(); in groups16_to_user() local 121 group = high2lowgid(from_kgid_munged(user_ns, kgid)); in groups16_to_user() 132 struct user_namespace *user_ns = current_user_ns(); in groups16_from_user() local 141 kgid = make_kgid(user_ns, low2highgid(group)); in groups16_from_user()
|
D | groups.c | 43 struct user_namespace *user_ns = current_user_ns(); in groups_to_user() local 49 gid = from_kgid_munged(user_ns, group_info->gid[i]); in groups_to_user() 60 struct user_namespace *user_ns = current_user_ns(); in groups_from_user() local 70 kgid = make_kgid(user_ns, gid); in groups_from_user() 191 struct user_namespace *user_ns = current_user_ns(); in may_setgroups() local 193 return ns_capable(user_ns, CAP_SETGID) && in may_setgroups() 194 userns_may_setgroups(user_ns); in may_setgroups()
|
D | pid_namespace.c | 92 static struct pid_namespace *create_pid_namespace(struct user_namespace *user_ns, in create_pid_namespace() argument 104 ucounts = inc_pid_namespaces(user_ns); in create_pid_namespace() 129 ns->user_ns = get_user_ns(user_ns); in create_pid_namespace() 157 put_user_ns(ns->user_ns); in delayed_free_pidns() 173 struct user_namespace *user_ns, struct pid_namespace *old_ns) in copy_pid_ns() argument 179 return create_pid_namespace(user_ns, old_ns); in copy_pid_ns() 298 if (write && !ns_capable(pid_ns->user_ns, CAP_SYS_ADMIN)) in pid_ns_ctl_handler() 384 if (!ns_capable(new->user_ns, CAP_SYS_ADMIN) || in pidns_install() 430 return to_pid_ns(ns)->user_ns; in pidns_owner()
|
D | user_namespace.c | 44 static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns) in set_cred_user_ns() argument 60 cred->user_ns = user_ns; in set_cred_user_ns() 73 struct user_namespace *ns, *parent_ns = new->user_ns; in create_user_ns() 1008 struct user_namespace *user_ns; in userns_get() local 1011 user_ns = get_user_ns(__task_cred(task)->user_ns); in userns_get() 1014 return user_ns ? &user_ns->ns : NULL; in userns_get() 1024 struct user_namespace *user_ns = to_user_ns(ns); in userns_install() local 1030 if (user_ns == current_user_ns()) in userns_install() 1040 if (!ns_capable(user_ns, CAP_SYS_ADMIN)) in userns_install() 1047 put_user_ns(cred->user_ns); in userns_install() [all …]
|
D | sys.c | 144 if (ns_capable(pcred->user_ns, CAP_SYS_NICE)) in set_one_prio_perm() 217 uid = make_kuid(cred->user_ns, who); in SYSCALL_DEFINE3() 285 uid = make_kuid(cred->user_ns, who); in SYSCALL_DEFINE2() 356 ns_capable(old->user_ns, CAP_SETGID)) in SYSCALL_DEFINE2() 365 ns_capable(old->user_ns, CAP_SETGID)) in SYSCALL_DEFINE2() 406 if (ns_capable(old->user_ns, CAP_SETGID)) in SYSCALL_DEFINE1() 490 !ns_capable(old->user_ns, CAP_SETUID)) in SYSCALL_DEFINE2() 499 !ns_capable(old->user_ns, CAP_SETUID)) in SYSCALL_DEFINE2() 553 if (ns_capable(old->user_ns, CAP_SETUID)) { in SYSCALL_DEFINE1() 610 if (!ns_capable(old->user_ns, CAP_SETUID)) { in SYSCALL_DEFINE3() [all …]
|
D | tsacct.c | 29 void bacct_add_tsk(struct user_namespace *user_ns, in bacct_add_tsk() argument 63 stats->ac_uid = from_kuid_munged(user_ns, tcred->uid); in bacct_add_tsk() 64 stats->ac_gid = from_kgid_munged(user_ns, tcred->gid); in bacct_add_tsk()
|
D | cred.c | 63 .user_ns = &init_user_ns, 124 put_user_ns(cred->user_ns); in put_cred_rcu() 264 get_user_ns(new->user_ns); in prepare_creds() 385 const struct user_namespace *set_ns = set->user_ns; in cred_cap_issubset() 386 const struct user_namespace *subset_ns = subset->user_ns; in cred_cap_issubset() 616 get_user_ns(new->user_ns); in prepare_kernel_cred()
|
D | ucount.c | 40 struct user_namespace *user_ns = in set_permissions() local 45 if (ns_capable(user_ns, CAP_SYS_RESOURCE)) in set_permissions()
|
D | acct.c | 492 ac.ac_uid = from_kuid_munged(file->f_cred->user_ns, orig_cred->uid); in do_acct_process() 493 ac.ac_gid = from_kgid_munged(file->f_cred->user_ns, orig_cred->gid); in do_acct_process()
|
D | taskstats.c | 173 static void fill_stats(struct user_namespace *user_ns, in fill_stats() argument 191 bacct_add_tsk(user_ns, pid_ns, stats, tsk); in fill_stats()
|
D | ptrace.c | 48 !ptracer_capable(tsk, mm->user_ns))) { in ptrace_access_vm() 316 if (ptrace_has_cap(tcred->user_ns, mode)) in __ptrace_may_access() 325 !ptrace_has_cap(mm->user_ns, mode))) in __ptrace_may_access()
|
D | reboot.c | 288 if (!ns_capable(pid_ns->user_ns, CAP_SYS_BOOT)) in SYSCALL_DEFINE4()
|
D | cgroup.c | 227 .user_ns = &init_user_ns, 2101 if (!ns_capable(ns->user_ns, CAP_SYS_ADMIN)) { in cgroup_mount() 2860 !ns_capable(tcred->user_ns, CAP_SYS_NICE)) in cgroup_procs_write_permission() 5665 get_user_ns(init_cgroup_ns.user_ns); in cgroup_init() 6397 put_user_ns(ns->user_ns); in free_cgroup_ns() 6404 struct user_namespace *user_ns, in copy_cgroup_ns() argument 6419 if (!ns_capable(user_ns, CAP_SYS_ADMIN)) in copy_cgroup_ns() 6422 ucounts = inc_cgroup_namespaces(user_ns); in copy_cgroup_ns() 6439 new_ns->user_ns = get_user_ns(user_ns); in copy_cgroup_ns() 6456 !ns_capable(cgroup_ns->user_ns, CAP_SYS_ADMIN)) in cgroupns_install() [all …]
|
D | fork.c | 762 struct user_namespace *user_ns) in mm_init() argument 804 mm->user_ns = get_user_ns(user_ns); in mm_init() 865 put_user_ns(mm->user_ns); in __mmdrop() 1147 if (!mm_init(mm, tsk, mm->user_ns)) in dup_mm()
|
D | signal.c | 713 if (ns_capable(tcred->user_ns, CAP_KILL)) in kill_ok_by_cred() 964 if (current_user_ns() == task_cred_xxx(t, user_ns)) in userns_fixup_signal_uid() 971 info->si_uid = from_kuid_munged(task_cred_xxx(t, user_ns), in userns_fixup_signal_uid() 1622 info.si_uid = from_kuid_munged(task_cred_xxx(tsk->parent, user_ns), in do_notify_parent() 1708 info.si_uid = from_kuid_munged(task_cred_xxx(parent, user_ns), task_uid(tsk)); in do_notify_parent_cldstop()
|
D | pid.c | 81 .user_ns = &init_user_ns,
|
/kernel/sched/ |
D | core.c | 4823 if (!ns_capable(__task_cred(p)->user_ns, CAP_SYS_NICE)) { in sched_setaffinity()
|