Home
last modified time | relevance | path

Searched refs:user_namespace (Results 1 – 65 of 65) sorted by relevance

/linux-4.4.14/include/linux/
Duidgid.h17 struct user_namespace;
18 extern struct user_namespace init_user_ns;
122 extern kuid_t make_kuid(struct user_namespace *from, uid_t uid);
123 extern kgid_t make_kgid(struct user_namespace *from, gid_t gid);
125 extern uid_t from_kuid(struct user_namespace *to, kuid_t uid);
126 extern gid_t from_kgid(struct user_namespace *to, kgid_t gid);
127 extern uid_t from_kuid_munged(struct user_namespace *to, kuid_t uid);
128 extern gid_t from_kgid_munged(struct user_namespace *to, kgid_t gid);
130 static inline bool kuid_has_mapping(struct user_namespace *ns, kuid_t uid) in kuid_has_mapping()
135 static inline bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid) in kgid_has_mapping()
[all …]
Duser_namespace.h25 struct user_namespace { struct
30 struct user_namespace *parent; argument
44 extern struct user_namespace init_user_ns; argument
48 static inline struct user_namespace *get_user_ns(struct user_namespace *ns) in get_user_ns()
57 extern void free_user_ns(struct user_namespace *ns);
59 static inline void put_user_ns(struct user_namespace *ns) in put_user_ns()
74 extern bool userns_may_setgroups(const struct user_namespace *ns);
77 static inline struct user_namespace *get_user_ns(struct user_namespace *ns) in get_user_ns()
95 static inline void put_user_ns(struct user_namespace *ns) in put_user_ns()
99 static inline bool userns_may_setgroups(const struct user_namespace *ns) in userns_may_setgroups()
Dprojid.h16 struct user_namespace;
17 extern struct user_namespace init_user_ns;
52 extern kprojid_t make_kprojid(struct user_namespace *from, projid_t projid);
54 extern projid_t from_kprojid(struct user_namespace *to, kprojid_t projid);
55 extern projid_t from_kprojid_munged(struct user_namespace *to, kprojid_t projid);
57 static inline bool kprojid_has_mapping(struct user_namespace *ns, kprojid_t projid) in kprojid_has_mapping()
64 static inline kprojid_t make_kprojid(struct user_namespace *from, projid_t projid) in make_kprojid()
69 static inline projid_t from_kprojid(struct user_namespace *to, kprojid_t kprojid) in from_kprojid()
74 static inline projid_t from_kprojid_munged(struct user_namespace *to, kprojid_t kprojid) in from_kprojid_munged()
82 static inline bool kprojid_has_mapping(struct user_namespace *ns, kprojid_t projid) in kprojid_has_mapping()
Dutsname.h20 struct user_namespace;
21 extern struct user_namespace init_user_ns;
26 struct user_namespace *user_ns;
38 struct user_namespace *user_ns, struct uts_namespace *old_ns);
55 struct user_namespace *user_ns, struct uts_namespace *old_ns) in copy_utsname()
Dcapability.h41 struct user_namespace;
43 struct user_namespace *current_user_ns(void);
211 struct user_namespace *ns, int cap);
214 struct user_namespace *ns, int cap);
216 extern bool ns_capable(struct user_namespace *ns, int cap);
223 struct user_namespace *ns, int cap) in has_ns_capability()
232 struct user_namespace *ns, int cap) in has_ns_capability_noaudit()
240 static inline bool ns_capable(struct user_namespace *ns, int cap) in ns_capable()
246 extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap);
Dipc_namespace.h11 struct user_namespace;
60 struct user_namespace *user_ns;
117 struct user_namespace *user_ns, struct ipc_namespace *ns);
129 struct user_namespace *user_ns, struct ipc_namespace *ns) in copy_ipcs()
Dpid_namespace.h42 struct user_namespace *user_ns;
63 struct user_namespace *user_ns, struct pid_namespace *ns);
77 struct user_namespace *user_ns, struct pid_namespace *ns) in copy_pid_ns()
Dmnt_namespace.h7 struct user_namespace;
10 struct user_namespace *, struct fs_struct *);
Dtsacct_kern.h13 extern void bacct_add_tsk(struct user_namespace *user_ns,
17 static inline void bacct_add_tsk(struct user_namespace *user_ns, in bacct_add_tsk()
Dposix_acl_xattr.h67 struct posix_acl *posix_acl_from_xattr(struct user_namespace *user_ns,
69 int posix_acl_to_xattr(struct user_namespace *user_ns,
Dseq_file.h16 struct user_namespace;
31 struct user_namespace *user_ns;
147 static inline struct user_namespace *seq_user_ns(struct seq_file *seq) in seq_user_ns()
152 extern struct user_namespace init_user_ns; in seq_user_ns()
Dquota.h79 extern qid_t from_kqid(struct user_namespace *to, struct kqid qid);
80 extern qid_t from_kqid_munged(struct user_namespace *to, struct kqid qid);
97 static inline struct kqid make_kqid(struct user_namespace *from, in make_kqid()
Dnetlink.h186 struct user_namespace *ns, int cap);
188 struct user_namespace *ns, int cap);
Dinet_diag.h33 struct user_namespace *user_ns,
Dcred.h153 struct user_namespace *user_ns; /* user_ns the caps and keyrings are relative to. */
376 extern struct user_namespace init_user_ns;
Dsecurity.h66 struct user_namespace;
70 extern int cap_capable(const struct cred *cred, struct user_namespace *ns,
202 int security_capable(const struct cred *cred, struct user_namespace *ns,
204 int security_capable_noaudit(const struct cred *cred, struct user_namespace *ns,
434 struct user_namespace *ns, int cap) in security_capable()
440 struct user_namespace *ns, int cap) { in security_capable_noaudit()
Dlsm_hooks.h1322 int (*capable)(const struct cred *cred, struct user_namespace *ns,
Dsched.h437 struct user_namespace;
/linux-4.4.14/kernel/
Duser_namespace.c30 struct user_namespace *ns, int cap_setid,
33 static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns) in set_cred_user_ns()
62 struct user_namespace *ns, *parent_ns = new->user_ns; in create_user_ns()
138 void free_user_ns(struct user_namespace *ns) in free_user_ns()
140 struct user_namespace *parent; in free_user_ns()
239 kuid_t make_kuid(struct user_namespace *ns, uid_t uid) in make_kuid()
258 uid_t from_kuid(struct user_namespace *targ, kuid_t kuid) in from_kuid()
283 uid_t from_kuid_munged(struct user_namespace *targ, kuid_t kuid) in from_kuid_munged()
307 kgid_t make_kgid(struct user_namespace *ns, gid_t gid) in make_kgid()
326 gid_t from_kgid(struct user_namespace *targ, kgid_t kgid) in from_kgid()
[all …]
Dcapability.c296 struct user_namespace *ns, int cap) in has_ns_capability()
336 struct user_namespace *ns, int cap) in has_ns_capability_noaudit()
375 bool ns_capable(struct user_namespace *ns, int cap) in ns_capable()
420 bool file_ns_capable(const struct file *file, struct user_namespace *ns, in file_ns_capable()
444 struct user_namespace *ns = current_user_ns(); in capable_wrt_inode_uidgid()
Dutsname.c35 static struct uts_namespace *clone_uts_ns(struct user_namespace *user_ns, in clone_uts_ns()
67 struct user_namespace *user_ns, struct uts_namespace *old_ns) in copy_utsname()
Dnsproxy.c60 struct task_struct *tsk, struct user_namespace *user_ns, in create_new_namespaces()
127 struct user_namespace *user_ns = task_cred_xxx(tsk, user_ns); in copy_namespaces()
179 struct user_namespace *user_ns; in unshare_nsproxy_namespaces()
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()
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()
Dpid_namespace.c82 static struct pid_namespace *create_pid_namespace(struct user_namespace *user_ns, in create_pid_namespace()
154 struct user_namespace *user_ns, struct pid_namespace *old_ns) in copy_pid_ns()
Duser.c25 struct user_namespace init_user_ns = {
Dtsacct.c29 void bacct_add_tsk(struct user_namespace *user_ns, in bacct_add_tsk()
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()
1806 struct user_namespace *ns = current_user_ns(); in validate_prctl_map()
DMakefile62 obj-$(CONFIG_USER_NS) += user_namespace.o
Dcred.c385 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()
Dtaskstats.c169 static void fill_stats(struct user_namespace *user_ns, in fill_stats()
Dptrace.c210 static int ptrace_has_cap(struct user_namespace *ns, unsigned int mode) in ptrace_has_cap()
/linux-4.4.14/security/keys/
Dpersistent.c22 static int key_create_persistent_register(struct user_namespace *ns) in key_create_persistent_register()
42 static key_ref_t key_create_persistent(struct user_namespace *ns, kuid_t uid, in key_create_persistent()
75 static long key_get_persistent(struct user_namespace *ns, kuid_t uid, in key_get_persistent()
131 struct user_namespace *ns = current_user_ns(); in keyctl_get_persistent()
Dproc.c87 struct user_namespace *user_ns = seq_user_ns(p); in key_serial_next()
106 struct user_namespace *user_ns = seq_user_ns(p); in find_ge_key()
272 static struct rb_node *__key_user_next(struct user_namespace *user_ns, struct rb_node *n) in __key_user_next()
283 static struct rb_node *key_user_next(struct user_namespace *user_ns, struct rb_node *n) in key_user_next()
288 static struct rb_node *key_user_first(struct user_namespace *user_ns, struct rb_root *r) in key_user_first()
/linux-4.4.14/include/net/
Dnet_namespace.h34 struct user_namespace;
62 struct user_namespace *user_ns; /* Owning user namespace */
150 struct net *copy_net_ns(unsigned long flags, struct user_namespace *user_ns,
157 struct user_namespace *user_ns, struct net *old_net) in copy_net_ns()
Dscm.h121 struct user_namespace *current_ns = current_user_ns(); in scm_recv()
Dsock.h704 static inline struct user_namespace *sk_user_ns(struct sock *sk) in sk_user_ns()
2282 struct user_namespace *user_ns, int cap);
/linux-4.4.14/fs/quota/
Dkqid.c67 qid_t from_kqid(struct user_namespace *targ, struct kqid kqid) in from_kqid()
100 qid_t from_kqid_munged(struct user_namespace *targ, struct kqid kqid) in from_kqid_munged()
/linux-4.4.14/ipc/
Dnamespace.c19 static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns, in create_ipc_ns()
55 struct user_namespace *user_ns, struct ipc_namespace *ns) in copy_ipcs()
Dmsg.c1043 struct user_namespace *user_ns = seq_user_ns(s); in sysvipc_msg_proc_show()
Dshm.c1367 struct user_namespace *user_ns = seq_user_ns(s); in sysvipc_shm_proc_show()
Dmqueue.c76 struct user_namespace *notify_user_ns;
Dsem.c2182 struct user_namespace *user_ns = seq_user_ns(s); in sysvipc_sem_proc_show()
/linux-4.4.14/fs/
Dposix_acl.c599 struct user_namespace *to, struct user_namespace *from, in posix_acl_fix_xattr_userns()
639 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()
657 posix_acl_from_xattr(struct user_namespace *user_ns, in posix_acl_from_xattr()
726 posix_acl_to_xattr(struct user_namespace *user_ns, const struct posix_acl *acl, in posix_acl_to_xattr()
Dmount.h12 struct user_namespace *user_ns;
Dpnode.c200 static struct user_namespace *user_ns;
Dfcntl.c221 struct user_namespace *user_ns = current_user_ns(); in f_getowner_uids()
Dnamespace.c2380 struct user_namespace *user_ns = current->nsproxy->mnt_ns->user_ns; in do_new_mount()
2748 static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns) in alloc_mnt_ns()
2773 struct user_namespace *user_ns, struct fs_struct *new_fs) in copy_mnt_ns()
Dinode.c1957 struct user_namespace *ns; in inode_owner_or_capable()
/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()
/linux-4.4.14/security/
Dcommoncap.c71 int cap_capable(const struct cred *cred, struct user_namespace *targ_ns, in cap_capable()
74 struct user_namespace *ns = targ_ns; in cap_capable()
Dsecurity.c184 int security_capable(const struct cred *cred, struct user_namespace *ns, in security_capable()
190 int security_capable_noaudit(const struct cred *cred, struct user_namespace *ns, in security_capable_noaudit()
/linux-4.4.14/net/netfilter/
Dnfnetlink_log.c66 struct user_namespace *peer_user_ns; /* User namespace of the peer process */
156 u32 portid, struct user_namespace *user_ns) in instance_create()
559 struct user_namespace *user_ns = inst->peer_user_ns; in __build_packet_message()
/linux-4.4.14/net/packet/
Ddiag.c132 struct user_namespace *user_ns, in sk_diag_fill()
/linux-4.4.14/net/ipv4/
Dinet_diag.c109 struct user_namespace *user_ns, in inet_sk_diag_fill()
257 struct user_namespace *user_ns, in inet_csk_diag_fill()
337 struct user_namespace *user_ns, in sk_diag_fill()
Dsysctl_net_ipv4.c124 struct user_namespace *user_ns = current_user_ns(); in ipv4_ping_group_range()
/linux-4.4.14/net/core/
Dnet_namespace.c272 static __net_init int setup_net(struct net *net, struct user_namespace *user_ns) in setup_net()
352 struct user_namespace *user_ns, struct net *old_net) in copy_net_ns()
Dsock.c160 struct user_namespace *user_ns, int cap) in sk_ns_capable()
1022 struct user_namespace *current_ns = current_user_ns(); in cred_to_ucred()
/linux-4.4.14/fs/autofs4/
Dwaitq.c149 struct user_namespace *user_ns = sbi->pipe->f_cred->user_ns; in autofs4_notify_daemon()
/linux-4.4.14/fs/proc/
Dbase.c2588 struct user_namespace *ns = NULL; in proc_id_map_open()
2620 struct user_namespace *ns = seq->private; in proc_id_map_release()
2666 struct user_namespace *ns = NULL; in proc_setgroups_open()
2701 struct user_namespace *ns = seq->private; in proc_setgroups_release()
Darray.c145 struct user_namespace *user_ns = seq_user_ns(m); in task_state()
/linux-4.4.14/security/apparmor/
Dlsm.c131 static int apparmor_capable(const struct cred *cred, struct user_namespace *ns, in apparmor_capable()
/linux-4.4.14/net/sunrpc/
Dsvcauth_unix.c549 struct user_namespace *user_ns = &init_user_ns; in unix_gid_show()
/linux-4.4.14/net/netlink/
Daf_netlink.c1396 struct user_namespace *user_ns, int cap) in __netlink_ns_capable()
1415 struct user_namespace *user_ns, int cap) in netlink_ns_capable()
/linux-4.4.14/security/selinux/
Dhooks.c2079 static int selinux_capable(const struct cred *cred, struct user_namespace *ns, in selinux_capable()