Home
last modified time | relevance | path

Searched refs:current_user_ns (Results 1 – 86 of 86) sorted by relevance

/linux-4.4.14/kernel/
Duid16.c114 struct user_namespace *user_ns = current_user_ns(); in groups16_to_user()
132 struct user_namespace *user_ns = current_user_ns(); in groups16_from_user()
201 return high2lowuid(from_kuid_munged(current_user_ns(), current_uid())); in SYSCALL_DEFINE0()
206 return high2lowuid(from_kuid_munged(current_user_ns(), current_euid())); in SYSCALL_DEFINE0()
211 return high2lowgid(from_kgid_munged(current_user_ns(), current_gid())); in SYSCALL_DEFINE0()
216 return high2lowgid(from_kgid_munged(current_user_ns(), current_egid())); in SYSCALL_DEFINE0()
Dgroups.c67 struct user_namespace *user_ns = current_user_ns(); in groups_to_user()
84 struct user_namespace *user_ns = current_user_ns(); in groups_from_user()
216 struct user_namespace *user_ns = current_user_ns(); in may_setgroups()
Dnsproxy.c186 user_ns = new_cred ? new_cred->user_ns : current_user_ns(); in unshare_nsproxy_namespaces()
238 new_nsproxy = create_new_namespaces(0, tsk, current_user_ns(), tsk->fs); in SYSCALL_DEFINE2()
Dsys.c331 struct user_namespace *ns = current_user_ns(); in SYSCALL_DEFINE2()
388 struct user_namespace *ns = current_user_ns(); in SYSCALL_DEFINE1()
464 struct user_namespace *ns = current_user_ns(); in SYSCALL_DEFINE2()
535 struct user_namespace *ns = current_user_ns(); in SYSCALL_DEFINE1()
582 struct user_namespace *ns = current_user_ns(); in SYSCALL_DEFINE3()
669 struct user_namespace *ns = current_user_ns(); in SYSCALL_DEFINE3()
861 return from_kuid_munged(current_user_ns(), current_uid()); in SYSCALL_DEFINE0()
867 return from_kuid_munged(current_user_ns(), current_euid()); in SYSCALL_DEFINE0()
873 return from_kgid_munged(current_user_ns(), current_gid()); in SYSCALL_DEFINE0()
879 return from_kgid_munged(current_user_ns(), current_egid()); in SYSCALL_DEFINE0()
[all …]
Dutsname.c124 !ns_capable(current_user_ns(), CAP_SYS_ADMIN)) in utsns_install()
Dcapability.c444 struct user_namespace *ns = current_user_ns(); in capable_wrt_inode_uidgid()
Dtaskstats.c204 fill_stats(current_user_ns(), task_active_pid_ns(current), tsk, stats); in fill_stats_for_pid()
289 if (current_user_ns() != &init_user_ns) in add_del_listener()
Dsignal.c954 if (current_user_ns() == task_cred_xxx(t, user_ns)) in userns_fixup_signal_uid()
962 make_kuid(current_user_ns(), info->si_uid)); in userns_fixup_signal_uid()
1030 q->info.si_uid = from_kuid_munged(current_user_ns(), current_uid()); in __send_signal()
1907 info.si_uid = from_kuid_munged(current_user_ns(), current_uid()); in ptrace_do_notify()
2116 info->si_uid = from_kuid_munged(current_user_ns(), in ptrace_signal()
2855 info.si_uid = from_kuid_munged(current_user_ns(), current_uid()); in SYSCALL_DEFINE2()
2898 info.si_uid = from_kuid_munged(current_user_ns(), current_uid()); in do_tkill()
Dpid_namespace.c366 !ns_capable(current_user_ns(), CAP_SYS_ADMIN)) in pidns_install()
Dexit.c986 uid_t uid = from_kuid_munged(current_user_ns(), task_uid(p)); in wait_task_zombie()
1193 uid = from_kuid_munged(current_user_ns(), task_uid(p)); in wait_task_stopped()
1267 uid = from_kuid_munged(current_user_ns(), task_uid(p)); in wait_task_continued()
Dauditfilter.c466 f->uid = make_kuid(current_user_ns(), f->val); in audit_data_to_entry()
475 f->gid = make_kgid(current_user_ns(), f->val); in audit_data_to_entry()
Dseccomp.c364 security_capable_noaudit(current_cred(), current_user_ns(), in seccomp_prepare_filter()
Duser_namespace.c977 if (user_ns == current_user_ns()) in userns_install()
Daudit.c663 if (current_user_ns() != &init_user_ns) in audit_netlink_ok()
/linux-4.4.14/arch/s390/kernel/
Dcompat_linux.c186 struct user_namespace *user_ns = current_user_ns(); in groups16_to_user()
203 struct user_namespace *user_ns = current_user_ns(); in groups16_from_user()
274 return high2lowuid(from_kuid_munged(current_user_ns(), current_uid())); in COMPAT_SYSCALL_DEFINE0()
279 return high2lowuid(from_kuid_munged(current_user_ns(), current_euid())); in COMPAT_SYSCALL_DEFINE0()
284 return high2lowgid(from_kgid_munged(current_user_ns(), current_gid())); in COMPAT_SYSCALL_DEFINE0()
289 return high2lowgid(from_kgid_munged(current_user_ns(), current_egid())); in COMPAT_SYSCALL_DEFINE0()
369 tmp.st_uid = from_kuid_munged(current_user_ns(), stat->uid); in cp_stat64()
370 tmp.st_gid = from_kgid_munged(current_user_ns(), stat->gid); in cp_stat64()
/linux-4.4.14/fs/xfs/
Dxfs_icache.h101 dst->eof_uid = make_kuid(current_user_ns(), src->eof_uid); in xfs_fs_eofblocks_from_user()
108 dst->eof_gid = make_kgid(current_user_ns(), src->eof_gid); in xfs_fs_eofblocks_from_user()
Dxfs_ioctl.c1166 if (current_user_ns() == &init_user_ns) in xfs_ioctl_setattr_check_projid()
/linux-4.4.14/ipc/
Dutil.c521 out->uid = from_kuid_munged(current_user_ns(), in->uid); in kernel_to_ipc64_perm()
522 out->gid = from_kgid_munged(current_user_ns(), in->gid); in kernel_to_ipc64_perm()
523 out->cuid = from_kuid_munged(current_user_ns(), in->cuid); in kernel_to_ipc64_perm()
524 out->cgid = from_kgid_munged(current_user_ns(), in->cgid); in kernel_to_ipc64_perm()
656 kuid_t uid = make_kuid(current_user_ns(), in->uid); in ipc_update_perm()
657 kgid_t gid = make_kgid(current_user_ns(), in->gid); in ipc_update_perm()
Dnamespace.c159 !ns_capable(current_user_ns(), CAP_SYS_ADMIN)) in ipcns_install()
Dmqueue.c1306 info->notify_user_ns = get_user_ns(current_user_ns()); in SYSCALL_DEFINE2()
/linux-4.4.14/fs/
Dstat.c163 SET_UID(tmp.st_uid, from_kuid_munged(current_user_ns(), stat->uid)); in cp_old_stat()
164 SET_GID(tmp.st_gid, from_kgid_munged(current_user_ns(), stat->gid)); in cp_old_stat()
249 SET_UID(tmp.st_uid, from_kuid_munged(current_user_ns(), stat->uid)); in cp_new_stat()
250 SET_GID(tmp.st_gid, from_kgid_munged(current_user_ns(), stat->gid)); in cp_new_stat()
384 tmp.st_uid = from_kuid_munged(current_user_ns(), stat->uid); in cp_new_stat64()
385 tmp.st_gid = from_kgid_munged(current_user_ns(), stat->gid); in cp_new_stat64()
Dopen.c484 if (!ns_capable(current_user_ns(), CAP_SYS_CHROOT)) in SYSCALL_DEFINE1()
576 uid = make_kuid(current_user_ns(), user); in chown_common()
577 gid = make_kgid(current_user_ns(), group); in chown_common()
Dposix_acl.c639 struct user_namespace *user_ns = current_user_ns(); in posix_acl_fix_xattr_from_user()
647 struct user_namespace *user_ns = current_user_ns(); in posix_acl_fix_xattr_to_user()
Dfcntl.c221 struct user_namespace *user_ns = current_user_ns(); in f_getowner_uids()
Dcompat.c145 SET_UID(tmp.st_uid, from_kuid_munged(current_user_ns(), stat->uid)); in cp_compat_stat()
146 SET_GID(tmp.st_gid, from_kgid_munged(current_user_ns(), stat->gid)); in cp_compat_stat()
Dnamespace.c3314 !ns_capable(current_user_ns(), CAP_SYS_CHROOT) || in mntns_install()
3315 !ns_capable(current_user_ns(), CAP_SYS_ADMIN)) in mntns_install()
Dinode.c1962 ns = current_user_ns(); in inode_owner_or_capable()
/linux-4.4.14/net/ax25/
Dax25_uid.c84 res = from_kuid_munged(current_user_ns(), ax25_uid->uid); in ax25_uid_ioctl()
97 sax25_kuid = make_kuid(current_user_ns(), sax->sax25_uid); in ax25_uid_ioctl()
/linux-4.4.14/fs/devpts/
Dinode.c193 uid = make_kuid(current_user_ns(), option); in parse_mount_options()
202 gid = make_kgid(current_user_ns(), option); in parse_mount_options()
253 root_uid = make_kuid(current_user_ns(), 0); in mknod_ptmx()
254 root_gid = make_kgid(current_user_ns(), 0); in mknod_ptmx()
460 if ((current_user_ns() != &init_user_ns) && !opts.newinstance) in devpts_mount()
/linux-4.4.14/fs/ncpfs/
Dinode.c406 data->uid = make_kuid(current_user_ns(), optint); in ncp_parse_options()
413 data->gid = make_kgid(current_user_ns(), optint); in ncp_parse_options()
420 data->mounted_uid = make_kuid(current_user_ns(), optint); in ncp_parse_options()
497 data.mounted_uid = make_kuid(current_user_ns(), md->mounted_uid); in ncp_fill_super()
502 data.uid = make_kuid(current_user_ns(), md->uid); in ncp_fill_super()
503 data.gid = make_kgid(current_user_ns(), md->gid); in ncp_fill_super()
516 data.mounted_uid = make_kuid(current_user_ns(), md->mounted_uid); in ncp_fill_super()
521 data.uid = make_kuid(current_user_ns(), md->uid); in ncp_fill_super()
522 data.gid = make_kgid(current_user_ns(), md->gid); in ncp_fill_super()
Dioctl.c48 SET_UID(info.mounted_uid, from_kuid_munged(current_user_ns(), server->m.mounted_uid)); in ncp_get_fs_info()
72 info2.mounted_uid = from_kuid_munged(current_user_ns(), server->m.mounted_uid); in ncp_get_fs_info_v2()
138 info2.mounted_uid = from_kuid_munged(current_user_ns(), server->m.mounted_uid); in ncp_get_compat_fs_info_v2()
350 SET_UID(uid, from_kuid_munged(current_user_ns(), server->m.mounted_uid)); in __ncp_ioctl()
357 uid_t uid = from_kuid_munged(current_user_ns(), server->m.mounted_uid); in __ncp_ioctl()
364 uid_t uid = from_kuid_munged(current_user_ns(), server->m.mounted_uid); in __ncp_ioctl()
/linux-4.4.14/fs/hfsplus/
Doptions.c138 sbi->uid = make_kuid(current_user_ns(), (uid_t)tmp); in hfsplus_parse_options()
149 sbi->gid = make_kgid(current_user_ns(), (gid_t)tmp); in hfsplus_parse_options()
/linux-4.4.14/block/
Dioprio.c114 uid = make_kuid(current_user_ns(), who); in SYSCALL_DEFINE3()
214 uid = make_kuid(current_user_ns(), who); in SYSCALL_DEFINE2()
/linux-4.4.14/include/linux/
Dcred.h378 #define current_user_ns() (current_cred_xxx(user_ns)) macro
380 #define current_user_ns() (&init_user_ns) macro
Dcapability.h43 struct user_namespace *current_user_ns(void);
/linux-4.4.14/arch/x86/ia32/
Dsys_ia32.c74 SET_UID(uid, from_kuid_munged(current_user_ns(), stat->uid)); in cp_stat64()
75 SET_GID(gid, from_kgid_munged(current_user_ns(), stat->gid)); in cp_stat64()
/linux-4.4.14/fs/9p/
Dv9fs.c168 v9ses->dfltuid = make_kuid(current_user_ns(), option); in v9fs_parse_options()
184 v9ses->dfltgid = make_kgid(current_user_ns(), option); in v9fs_parse_options()
280 v9ses->uid = make_kuid(current_user_ns(), uid); in v9fs_parse_options()
/linux-4.4.14/fs/quota/
Dquota.c36 if ((type == USRQUOTA && uid_eq(current_euid(), make_kuid(current_user_ns(), id))) || in check_quotactl_permission()
37 (type == GRPQUOTA && in_egroup_p(make_kgid(current_user_ns(), id)))) in check_quotactl_permission()
213 qid = make_kqid(current_user_ns(), type, id); in quota_getquota()
262 qid = make_kqid(current_user_ns(), type, id); in quota_setquota()
555 qid = make_kqid(current_user_ns(), type, id); in quota_setxquota()
616 qid = make_kqid(current_user_ns(), type, id); in quota_getxquota()
/linux-4.4.14/arch/sparc/kernel/
Dsys_sparc32.c79 err |= put_user(from_kuid_munged(current_user_ns(), stat->uid), &statbuf->st_uid); in cp_compat_stat64()
80 err |= put_user(from_kgid_munged(current_user_ns(), stat->gid), &statbuf->st_gid); in cp_compat_stat64()
/linux-4.4.14/net/netfilter/
Dxt_owner.c27 (current_user_ns() != &init_user_ns)) in owner_check()
/linux-4.4.14/net/core/
Dscm.c188 uid = make_kuid(current_user_ns(), creds.uid); in __scm_send()
189 gid = make_kgid(current_user_ns(), creds.gid); in __scm_send()
Dnet_namespace.c991 !ns_capable(current_user_ns(), CAP_SYS_ADMIN)) in netns_install()
Dsock.c1022 struct user_namespace *current_ns = current_user_ns(); in cred_to_ucred()
/linux-4.4.14/fs/autofs4/
Dinode.c162 *uid = make_kuid(current_user_ns(), option); in parse_options()
169 *gid = make_kgid(current_user_ns(), option); in parse_options()
Ddev-ioctl.c459 param->requester.uid = from_kuid_munged(current_user_ns(), ino->uid); in autofs_dev_ioctl_requester()
460 param->requester.gid = from_kgid_munged(current_user_ns(), ino->gid); in autofs_dev_ioctl_requester()
/linux-4.4.14/security/keys/
Dpersistent.c131 struct user_namespace *ns = current_user_ns(); in keyctl_get_persistent()
Dkeyctl.c594 from_kuid_munged(current_user_ns(), key->uid), in keyctl_describe_key()
595 from_kgid_munged(current_user_ns(), key->gid), in keyctl_describe_key()
796 uid = make_kuid(current_user_ns(), user); in keyctl_chown_key()
797 gid = make_kgid(current_user_ns(), group); in keyctl_chown_key()
Dkeyring.c995 if (!kuid_has_mapping(current_user_ns(), keyring->user->uid)) in find_keyring_by_name()
/linux-4.4.14/include/net/
Dscm.h121 struct user_namespace *current_ns = current_user_ns(); in scm_recv()
/linux-4.4.14/fs/hfs/
Dsuper.c260 hsb->s_uid = make_kuid(current_user_ns(), (uid_t)tmp); in parse_options()
271 hsb->s_gid = make_kgid(current_user_ns(), (gid_t)tmp); in parse_options()
/linux-4.4.14/arch/arm/kernel/
Dsys_oabi-compat.c127 tmp.st_uid = from_kuid_munged(current_user_ns(), stat->uid); in cp_oldabi_stat64()
128 tmp.st_gid = from_kgid_munged(current_user_ns(), stat->gid); in cp_oldabi_stat64()
/linux-4.4.14/fs/tracefs/
Dinode.c185 uid = make_kuid(current_user_ns(), option); in tracefs_parse_options()
193 gid = make_kgid(current_user_ns(), option); in tracefs_parse_options()
/linux-4.4.14/arch/s390/hypfs/
Dinode.c236 uid = make_kuid(current_user_ns(), option); in hypfs_parse_options()
244 gid = make_kgid(current_user_ns(), option); in hypfs_parse_options()
/linux-4.4.14/fs/proc/
Droot.c71 pid->pid_gid = make_kgid(current_user_ns(), option); in proc_parse_options()
/linux-4.4.14/fs/debugfs/
Dinode.c91 uid = make_kuid(current_user_ns(), option); in debugfs_parse_options()
99 gid = make_kgid(current_user_ns(), option); in debugfs_parse_options()
/linux-4.4.14/fs/adfs/
Dsuper.c178 asb->s_uid = make_kuid(current_user_ns(), option); in parse_options()
185 asb->s_gid = make_kgid(current_user_ns(), option); in parse_options()
/linux-4.4.14/arch/ia64/kernel/
Dsignal.c212 si.si_uid = from_kuid_munged(current_user_ns(), current_uid()); in ia64_rt_sigreturn()
309 si.si_uid = from_kuid_munged(current_user_ns(), current_uid()); in force_sigsegv_info()
/linux-4.4.14/fs/omfs/
Dinode.c394 sbi->s_uid = make_kuid(current_user_ns(), option); in parse_options()
401 sbi->s_gid = make_kgid(current_user_ns(), option); in parse_options()
/linux-4.4.14/fs/affs/
Dsuper.c259 *gid = make_kgid(current_user_ns(), option); in parse_options()
267 *uid = make_kuid(current_user_ns(), option); in parse_options()
/linux-4.4.14/security/yama/
Dyama_lsm.c332 if (!has_ns_capability(parent, current_user_ns(), CAP_SYS_PTRACE)) in yama_ptrace_traceme()
/linux-4.4.14/arch/powerpc/platforms/cell/spufs/
Dinode.c623 root->i_uid = make_kuid(current_user_ns(), option); in spufs_parse_options()
630 root->i_gid = make_kgid(current_user_ns(), option); in spufs_parse_options()
/linux-4.4.14/fs/hpfs/
Dsuper.c345 *uid = make_kuid(current_user_ns(), option); in parse_opts()
352 *gid = make_kgid(current_user_ns(), option); in parse_opts()
/linux-4.4.14/fs/gfs2/
Dsys.c209 qid = make_kqid(current_user_ns(), USRQUOTA, id); in quota_refresh_user_store()
231 qid = make_kqid(current_user_ns(), GRPQUOTA, id); in quota_refresh_group_store()
/linux-4.4.14/fs/befs/
Dlinuxvfs.c686 uid = make_kuid(current_user_ns(), option); in parse_options()
700 gid = make_kgid(current_user_ns(), option); in parse_options()
/linux-4.4.14/security/integrity/ima/
Dima_policy.c650 entry->uid = make_kuid(current_user_ns(), in ima_parse_rule()
670 entry->fowner = make_kuid(current_user_ns(), (uid_t)lnum); in ima_parse_rule()
/linux-4.4.14/fs/coda/
Dpsdev.c275 if (current_user_ns() != &init_user_ns) in coda_psdev_open()
/linux-4.4.14/fs/jfs/
Dsuper.c340 sbi->uid = make_kuid(current_user_ns(), val); in parse_options()
354 sbi->gid = make_kgid(current_user_ns(), val); in parse_options()
/linux-4.4.14/drivers/connector/
Dcn_proc.c349 if ((current_user_ns() != &init_user_ns) || in cn_proc_mcast_ctl()
/linux-4.4.14/drivers/net/
Dtun.c1578 from_kuid_munged(current_user_ns(), tun->owner)): in tun_show_owner()
1588 from_kgid_munged(current_user_ns(), tun->group)): in tun_show_group()
1984 owner = make_kuid(current_user_ns(), arg); in __tun_chr_ioctl()
1996 group = make_kgid(current_user_ns(), arg); in __tun_chr_ioctl()
/linux-4.4.14/fs/fuse/
Dinode.c505 d->user_id = make_kuid(current_user_ns(), uv); in parse_fuse_opt()
514 d->group_id = make_kgid(current_user_ns(), uv); in parse_fuse_opt()
/linux-4.4.14/arch/alpha/kernel/
Dosf_sys.c280 tmp.st_uid = from_kuid_munged(current_user_ns(), lstat->uid); in linux_to_osf_stat()
281 tmp.st_gid = from_kgid_munged(current_user_ns(), lstat->gid); in linux_to_osf_stat()
/linux-4.4.14/fs/hugetlbfs/
Dinode.c1047 pconfig->uid = make_kuid(current_user_ns(), option); in hugetlbfs_parse_options()
1055 pconfig->gid = make_kgid(current_user_ns(), option); in hugetlbfs_parse_options()
/linux-4.4.14/fs/isofs/
Dinode.c433 popt->uid = make_kuid(current_user_ns(), option); in parse_options()
441 popt->gid = make_kgid(current_user_ns(), option); in parse_options()
/linux-4.4.14/security/
Dcommoncap.c873 if (!ns_capable(current_user_ns(), CAP_SETPCAP)) in cap_prctl_drop()
/linux-4.4.14/drivers/gpu/drm/
Ddrm_ioctl.c236 client->uid = from_kuid_munged(current_user_ns(), in drm_getclient()
/linux-4.4.14/fs/ext2/
Dsuper.c483 uid = make_kuid(current_user_ns(), option); in parse_options()
494 gid = make_kgid(current_user_ns(), option); in parse_options()
/linux-4.4.14/net/ipv4/
Dsysctl_net_ipv4.c124 struct user_namespace *user_ns = current_user_ns(); in ipv4_ping_group_range()
/linux-4.4.14/fs/fat/
Dinode.c1107 opts->fs_uid = make_kuid(current_user_ns(), option); in parse_options()
1114 opts->fs_gid = make_kgid(current_user_ns(), option); in parse_options()
/linux-4.4.14/fs/udf/
Dsuper.c546 uopt->gid = make_kgid(current_user_ns(), option); in udf_parse_options()
554 uopt->uid = make_kuid(current_user_ns(), option); in udf_parse_options()
/linux-4.4.14/drivers/staging/rdma/hfi1/
Dhfi.h1158 return from_kuid(current_user_ns(), uid) & 0xffff; in generate_jkey()
/linux-4.4.14/fs/ntfs/
Dsuper.c140 variable = make_kuid(current_user_ns(), uid_value); \ in parse_options()
152 variable = make_kgid(current_user_ns(), gid_value); \ in parse_options()
/linux-4.4.14/drivers/usb/gadget/function/
Df_fs.c1242 data->perms.uid = make_kuid(current_user_ns(), value); in ffs_fs_parse_opts()
1248 data->perms.gid = make_kgid(current_user_ns(), value); in ffs_fs_parse_opts()
/linux-4.4.14/mm/
Dshmem.c2816 sbinfo->uid = make_kuid(current_user_ns(), uid); in shmem_parse_options()
2825 sbinfo->gid = make_kgid(current_user_ns(), gid); in shmem_parse_options()
/linux-4.4.14/fs/cifs/
Dconnect.c1012 uid = make_kuid(current_user_ns(), value); in get_option_uid()
1030 gid = make_kgid(current_user_ns(), value); in get_option_gid()
/linux-4.4.14/fs/ext4/
Dsuper.c1564 uid = make_kuid(current_user_ns(), arg); in handle_mount_opt()
1571 gid = make_kgid(current_user_ns(), arg); in handle_mount_opt()
/linux-4.4.14/drivers/android/
Dbinder.c2396 tr.sender_euid = from_kuid(current_user_ns(), t->sender_euid); in binder_thread_read()