Home
last modified time | relevance | path

Searched refs:user_ns (Results 1 – 25 of 32) sorted by relevance

12

/fs/proc/
Droot.c87 struct user_namespace *user_ns) in proc_apply_options() argument
92 pid_ns->pid_gid = make_kgid(user_ns, ctx->gid); in proc_apply_options()
187 put_user_ns(fc->user_ns); in proc_init_fs_context()
188 fc->user_ns = get_user_ns(ctx->pid_ns->user_ns); in proc_init_fs_context()
312 if (fc->user_ns != ns->user_ns) { in pid_ns_prepare_proc()
313 put_user_ns(fc->user_ns); in pid_ns_prepare_proc()
314 fc->user_ns = get_user_ns(ns->user_ns); in pid_ns_prepare_proc()
Darray.c155 struct user_namespace *user_ns = seq_user_ns(m); in task_state() local
193 seq_put_decimal_ull(m, "\nUid:\t", from_kuid_munged(user_ns, cred->uid)); in task_state()
194 seq_put_decimal_ull(m, "\t", from_kuid_munged(user_ns, cred->euid)); in task_state()
195 seq_put_decimal_ull(m, "\t", from_kuid_munged(user_ns, cred->suid)); in task_state()
196 seq_put_decimal_ull(m, "\t", from_kuid_munged(user_ns, cred->fsuid)); in task_state()
197 seq_put_decimal_ull(m, "\nGid:\t", from_kgid_munged(user_ns, cred->gid)); in task_state()
198 seq_put_decimal_ull(m, "\t", from_kgid_munged(user_ns, cred->egid)); in task_state()
199 seq_put_decimal_ull(m, "\t", from_kgid_munged(user_ns, cred->sgid)); in task_state()
200 seq_put_decimal_ull(m, "\t", from_kgid_munged(user_ns, cred->fsgid)); in task_state()
207 from_kgid_munged(user_ns, group_info->gid[g])); in task_state()
Dproc_net.c352 uid = make_kuid(net->user_ns, 0); in proc_net_ns_init()
356 gid = make_kgid(net->user_ns, 0); in proc_net_ns_init()
Dbase.c1240 from_kuid(file->f_cred->user_ns, in proc_loginuid_read()
1274 kloginuid = make_kuid(file->f_cred->user_ns, loginuid); in proc_loginuid_write()
1727 struct user_namespace *user_ns = mm->user_ns; in task_dump_owner() local
1729 uid = make_kuid(user_ns, 0); in task_dump_owner()
1733 gid = make_kgid(user_ns, 0); in task_dump_owner()
2379 if (!ns_capable(__task_cred(p)->user_ns, CAP_SYS_NICE)) { in timerslack_ns_write()
2418 if (!ns_capable(__task_cred(p)->user_ns, CAP_SYS_NICE)) { in timerslack_ns_show()
2839 ns = get_user_ns(task_cred_xxx(task, user_ns)); in proc_id_map_open()
2917 ns = get_user_ns(task_cred_xxx(task, user_ns)); in proc_setgroups_open()
/fs/
Dposix_acl.c210 posix_acl_valid(struct user_namespace *user_ns, const struct posix_acl *acl) in posix_acl_valid() argument
230 if (!kuid_has_mapping(user_ns, pa->e_uid)) in posix_acl_valid()
245 if (!kgid_has_mapping(user_ns, pa->e_gid)) in posix_acl_valid()
707 struct user_namespace *user_ns = current_user_ns(); in posix_acl_fix_xattr_from_user() local
708 if (user_ns == &init_user_ns) in posix_acl_fix_xattr_from_user()
710 posix_acl_fix_xattr_userns(&init_user_ns, user_ns, value, size); in posix_acl_fix_xattr_from_user()
715 struct user_namespace *user_ns = current_user_ns(); in posix_acl_fix_xattr_to_user() local
716 if (user_ns == &init_user_ns) in posix_acl_fix_xattr_to_user()
718 posix_acl_fix_xattr_userns(user_ns, &init_user_ns, value, size); in posix_acl_fix_xattr_to_user()
725 posix_acl_from_xattr(struct user_namespace *user_ns, in posix_acl_from_xattr() argument
[all …]
Dfs_context.c276 fc->user_ns = get_user_ns(fc->cred->user_ns); in alloc_fs_context()
279 fc->user_ns = get_user_ns(reference->d_sb->s_user_ns); in alloc_fs_context()
283 fc->user_ns = get_user_ns(reference->d_sb->s_user_ns); in alloc_fs_context()
362 get_user_ns(fc->user_ns); in vfs_dup_fs_context()
505 put_user_ns(fc->user_ns); in put_fs_context()
Dsuper.c201 struct user_namespace *user_ns) in alloc_super() argument
211 s->s_user_ns = get_user_ns(user_ns); in alloc_super()
490 return ns_capable(fc->user_ns, CAP_SYS_ADMIN); in mount_capable()
517 struct user_namespace *user_ns = fc->global ? &init_user_ns : fc->user_ns; in sget_fc() local
530 s = alloc_super(fc->fs_type, fc->sb_flags, user_ns); in sget_fc()
556 if (user_ns != old->s_user_ns) { in sget_fc()
582 struct user_namespace *user_ns = current_user_ns(); in sget() local
592 user_ns = &init_user_ns; in sget()
600 if (user_ns != old->s_user_ns) { in sget()
613 s = alloc_super(type, (flags & ~SB_SUBMOUNT), user_ns); in sget()
Dexec.c1317 struct user_namespace *old, *user_ns; in would_dump() local
1321 user_ns = old = bprm->mm->user_ns; in would_dump()
1322 while ((user_ns != &init_user_ns) && in would_dump()
1323 !privileged_wrt_inode_uidgid(user_ns, inode)) in would_dump()
1324 user_ns = user_ns->parent; in would_dump()
1326 if (old != user_ns) { in would_dump()
1327 bprm->mm->user_ns = get_user_ns(user_ns); in would_dump()
1551 if (!kuid_has_mapping(bprm->cred->user_ns, uid) || in bprm_fill_uid()
1552 !kgid_has_mapping(bprm->cred->user_ns, gid)) in bprm_fill_uid()
Dnamespace.c1665 return ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN); in may_mount()
2067 struct user_namespace *user_ns = current->nsproxy->mnt_ns->user_ns; in attach_recursive_mnt() local
2123 if (child->mnt_parent->mnt_ns->user_ns != user_ns) in attach_recursive_mnt()
2344 struct user_namespace *user_ns = current->nsproxy->mnt_ns->user_ns; in open_detached_copy() local
2345 struct mnt_namespace *ns = alloc_mnt_ns(user_ns, true); in open_detached_copy()
3194 put_user_ns(ns->user_ns); in free_mnt_ns()
3207 static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns, bool anon) in alloc_mnt_ns() argument
3213 ucounts = inc_mnt_namespaces(user_ns); in alloc_mnt_ns()
3236 new_ns->user_ns = get_user_ns(user_ns); in alloc_mnt_ns()
3243 struct user_namespace *user_ns, struct fs_struct *new_fs) in copy_mnt_ns() argument
[all …]
Dnsfs.c189 struct user_namespace *user_ns; in ns_ioctl() local
206 user_ns = container_of(ns, struct user_namespace, ns); in ns_ioctl()
208 uid = from_kuid_munged(current_user_ns(), user_ns->owner); in ns_ioctl()
Dfsopen.c122 if (!ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN)) in SYSCALL_DEFINE2()
165 if (!ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN)) in SYSCALL_DEFINE3()
Dmount.h13 struct user_namespace *user_ns; member
Dbinfmt_elf_fdpic.c652 NEW_AUX_ENT(AT_UID, (elf_addr_t) from_kuid_munged(cred->user_ns, cred->uid)); in create_elf_fdpic_tables()
653 NEW_AUX_ENT(AT_EUID, (elf_addr_t) from_kuid_munged(cred->user_ns, cred->euid)); in create_elf_fdpic_tables()
654 NEW_AUX_ENT(AT_GID, (elf_addr_t) from_kgid_munged(cred->user_ns, cred->gid)); in create_elf_fdpic_tables()
655 NEW_AUX_ENT(AT_EGID, (elf_addr_t) from_kgid_munged(cred->user_ns, cred->egid)); in create_elf_fdpic_tables()
1413 SET_UID(psinfo->pr_uid, from_kuid_munged(cred->user_ns, cred->uid)); in fill_psinfo()
1414 SET_GID(psinfo->pr_gid, from_kgid_munged(cred->user_ns, cred->gid)); in fill_psinfo()
Dfcntl.c239 struct user_namespace *user_ns = current_user_ns(); in f_getowner_uids() local
245 src[0] = from_kuid(user_ns, filp->f_owner.uid); in f_getowner_uids()
246 src[1] = from_kuid(user_ns, filp->f_owner.euid); in f_getowner_uids()
Dbinfmt_elf.c255 NEW_AUX_ENT(AT_UID, from_kuid_munged(cred->user_ns, cred->uid)); in create_elf_tables()
256 NEW_AUX_ENT(AT_EUID, from_kuid_munged(cred->user_ns, cred->euid)); in create_elf_tables()
257 NEW_AUX_ENT(AT_GID, from_kgid_munged(cred->user_ns, cred->gid)); in create_elf_tables()
258 NEW_AUX_ENT(AT_EGID, from_kgid_munged(cred->user_ns, cred->egid)); in create_elf_tables()
1541 SET_UID(psinfo->pr_uid, from_kuid_munged(cred->user_ns, cred->uid)); in fill_psinfo()
1542 SET_GID(psinfo->pr_gid, from_kgid_munged(cred->user_ns, cred->gid)); in fill_psinfo()
/fs/sysfs/
Dmount.c75 put_user_ns(fc->user_ns); in sysfs_init_fs_context()
76 fc->user_ns = get_user_ns(netns->user_ns); in sysfs_init_fs_context()
/fs/fuse/
Dacl.c37 acl = posix_acl_from_xattr(fc->user_ns, value, size); in fuse_get_acl()
84 ret = posix_acl_to_xattr(fc->user_ns, acl, value, size); in fuse_set_acl()
Dinode.c160 inode->i_uid = make_kuid(fc->user_ns, attr->uid); in fuse_change_attributes_common()
161 inode->i_gid = make_kgid(fc->user_ns, attr->gid); in fuse_change_attributes_common()
508 ctx->user_id = make_kuid(fc->user_ns, result.uint_32); in fuse_parse_param()
515 ctx->group_id = make_kgid(fc->user_ns, result.uint_32); in fuse_parse_param()
564 seq_printf(m, ",user_id=%u", from_kuid_munged(fc->user_ns, fc->user_id)); in fuse_show_options()
565 seq_printf(m, ",group_id=%u", from_kgid_munged(fc->user_ns, fc->group_id)); in fuse_show_options()
603 void fuse_conn_init(struct fuse_conn *fc, struct user_namespace *user_ns, in fuse_conn_init() argument
628 fc->user_ns = get_user_ns(user_ns); in fuse_conn_init()
641 put_user_ns(fc->user_ns); in fuse_conn_put()
1239 (file->f_cred->user_ns != sb->s_user_ns)) in fuse_fill_super()
Dfuse_i.h520 struct user_namespace *user_ns; member
949 void fuse_conn_init(struct fuse_conn *fc, struct user_namespace *user_ns,
Ddir.c903 stat->uid = make_kuid(fc->user_ns, attr->uid); in fuse_fillattr()
904 stat->gid = make_kgid(fc->user_ns, attr->gid); in fuse_fillattr()
1089 return current_in_userns(fc->user_ns); in fuse_allow_current_process()
1368 arg->valid |= FATTR_UID, arg->uid = from_kuid(fc->user_ns, iattr->ia_uid); in iattr_to_fattr()
1370 arg->valid |= FATTR_GID, arg->gid = from_kgid(fc->user_ns, iattr->ia_gid); in iattr_to_fattr()
Ddev.c136 req->in.h.uid = from_kuid(fc->user_ns, current_fsuid()); in fuse_get_req()
137 req->in.h.gid = from_kgid(fc->user_ns, current_fsgid()); in fuse_get_req()
464 req->in.h.uid = from_kuid_munged(fc->user_ns, current_fsuid()); in fuse_force_creds()
465 req->in.h.gid = from_kgid_munged(fc->user_ns, current_fsgid()); in fuse_force_creds()
2238 old->f_cred->user_ns == file->f_cred->user_ns) in fuse_dev_ioctl()
/fs/autofs/
Dwaitq.c137 struct user_namespace *user_ns = sbi->pipe->f_cred->user_ns; in autofs_notify_daemon() local
147 packet->uid = from_kuid_munged(user_ns, wq->uid); in autofs_notify_daemon()
148 packet->gid = from_kgid_munged(user_ns, wq->gid); in autofs_notify_daemon()
/fs/nfs/
Dnfs4idmap.c78 return idmap->cred->user_ns; in idmap_userns()
289 if (!idmap->cred || idmap->cred->user_ns == &init_user_ns) in nfs_idmap_request_key()
/fs/nfsd/
Dnfsctl.c1404 put_user_ns(fc->user_ns); in nfsd_init_fs_context()
1405 fc->user_ns = get_user_ns(fc->net_ns->user_ns); in nfsd_init_fs_context()
Dnfsd.h131 return cred ? cred->user_ns : &init_user_ns; in nfsd_user_namespace()

12