| /linux/include/linux/ |
| H A D | user_namespace.h | 76 struct user_namespace { struct 80 struct user_namespace *parent; argument 121 struct user_namespace *ns; argument 129 extern struct user_namespace init_user_ns; 132 bool setup_userns_sysctls(struct user_namespace *ns); 133 void retire_userns_sysctls(struct user_namespace *ns); 134 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type); 136 struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid); 158 static inline long get_userns_rlimit_max(struct user_namespace *ns, enum rlimit_type type) in get_userns_rlimit_max() 163 static inline void set_userns_rlimit_max(struct user_namespace *ns, in set_userns_rlimit_max() [all …]
|
| H A D | uidgid.h | 18 struct user_namespace; 19 extern struct user_namespace init_user_ns; 115 extern kuid_t make_kuid(struct user_namespace *from, uid_t uid); 116 extern kgid_t make_kgid(struct user_namespace *from, gid_t gid); 118 extern uid_t from_kuid(struct user_namespace *to, kuid_t uid); 119 extern gid_t from_kgid(struct user_namespace *to, kgid_t gid); 120 extern uid_t from_kuid_munged(struct user_namespace *to, kuid_t uid); 121 extern gid_t from_kgid_munged(struct user_namespace *to, kgid_t gid); 123 static inline bool kuid_has_mapping(struct user_namespace *ns, kuid_t uid) in kuid_has_mapping() 128 static inline bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid) in kgid_has_mapping() [all …]
|
| H A D | capability.h | 41 struct user_namespace; 143 struct user_namespace *ns, int cap); 146 struct user_namespace *ns, int cap); 148 extern bool ns_capable(struct user_namespace *ns, int cap); 149 extern bool ns_capable_noaudit(struct user_namespace *ns, int cap); 150 extern bool ns_capable_setid(struct user_namespace *ns, int cap); 153 struct user_namespace *ns, int cap) in has_ns_capability() 162 struct user_namespace *ns, int cap) in has_ns_capability_noaudit() 170 static inline bool ns_capable(struct user_namespace *ns, int cap) in ns_capable() 174 static inline bool ns_capable_noaudit(struct user_namespace *ns, int cap) in ns_capable_noaudit() [all …]
|
| H A D | projid.h | 17 struct user_namespace; 18 extern struct user_namespace init_user_ns; 53 extern kprojid_t make_kprojid(struct user_namespace *from, projid_t projid); 55 extern projid_t from_kprojid(struct user_namespace *to, kprojid_t projid); 56 extern projid_t from_kprojid_munged(struct user_namespace *to, kprojid_t projid); 58 static inline bool kprojid_has_mapping(struct user_namespace *ns, kprojid_t projid) in kprojid_has_mapping() 65 static inline kprojid_t make_kprojid(struct user_namespace *from, projid_t projid) in make_kprojid() 70 static inline projid_t from_kprojid(struct user_namespace *to, kprojid_t kprojid) in from_kprojid() 75 static inline projid_t from_kprojid_munged(struct user_namespace *to, kprojid_t kprojid) in from_kprojid_munged() 83 static inline bool kprojid_has_mapping(struct user_namespace *ns, kprojid_t projid) in kprojid_has_mapping()
|
| H A D | mnt_idmapping.h | 9 struct user_namespace; 13 extern struct user_namespace init_user_ns; 128 struct user_namespace *fs_userns, kuid_t kuid); 131 struct user_namespace *fs_userns, kgid_t kgid); 134 struct user_namespace *fs_userns, vfsuid_t vfsuid); 137 struct user_namespace *fs_userns, vfsgid_t vfsgid); 152 struct user_namespace *fs_userns, in vfsuid_has_fsmapping() 158 static inline bool vfsuid_has_mapping(struct user_namespace *userns, in vfsuid_has_mapping() 190 struct user_namespace *fs_userns, in vfsgid_has_fsmapping() 196 static inline bool vfsgid_has_mapping(struct user_namespace *userns, in vfsgid_has_mapping() [all …]
|
| H A D | uts_namespace.h | 8 struct user_namespace; 9 extern struct user_namespace init_user_ns; 13 struct user_namespace *user_ns; 32 struct user_namespace *user_ns, struct uts_namespace *old_ns); 52 struct user_namespace *user_ns, struct uts_namespace *old_ns) in copy_utsname()
|
| H A D | time_namespace.h | 12 struct user_namespace; 13 extern struct user_namespace init_user_ns; 24 struct user_namespace *user_ns; 52 struct user_namespace *user_ns, 142 struct user_namespace *user_ns, in copy_time_ns()
|
| H A D | ipc_namespace.h | 16 struct user_namespace; 75 struct user_namespace *user_ns; 138 struct user_namespace *user_ns, struct ipc_namespace *ns); 160 struct user_namespace *user_ns, struct ipc_namespace *ns) in copy_ipcs()
|
| H A D | posix_acl_xattr.h | 36 struct posix_acl *posix_acl_from_xattr(struct user_namespace *user_ns, 40 posix_acl_from_xattr(struct user_namespace *user_ns, const void *value, in posix_acl_from_xattr() 47 extern void *posix_acl_to_xattr(struct user_namespace *user_ns, const struct posix_acl *acl,
|
| H A D | cgroup_namespace.h | 9 struct user_namespace *user_ns; 26 struct user_namespace *user_ns, 47 copy_cgroup_ns(u64 flags, struct user_namespace *user_ns, in copy_cgroup_ns()
|
| H A D | pid_namespace.h | 45 struct user_namespace *user_ns; 86 struct user_namespace *user_ns, struct pid_namespace *ns); 108 struct user_namespace *user_ns, struct pid_namespace *ns) in copy_pid_ns()
|
| H A D | mnt_namespace.h | 11 struct user_namespace; 17 struct user_namespace *, struct fs_struct *);
|
| /linux/kernel/ |
| H A D | user_namespace.c | 30 struct user_namespace *ns, int cap_setid, 34 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces() 44 static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns) in set_cred_user_ns() 85 struct user_namespace *ns, *parent_ns = new->user_ns; in create_user_ns() 199 struct user_namespace *parent, *ns = in free_user_ns() 200 container_of(work, struct user_namespace, work); in free_user_ns() 231 void __put_user_ns(struct user_namespace *ns) in __put_user_ns() 422 kuid_t make_kuid(struct user_namespace *ns, uid_t uid) in make_kuid() 441 uid_t from_kuid(struct user_namespace *targ, kuid_t kuid) in from_kuid() 466 uid_t from_kuid_munged(struct user_namespace *targ, kuid_t kuid) in from_kuid_munged() [all …]
|
| H A D | capability.c | 277 struct user_namespace *ns, int cap) in has_ns_capability() 302 struct user_namespace *ns, int cap) in has_ns_capability_noaudit() 331 static bool ns_capable_common(struct user_namespace *ns, in ns_capable_common() 361 bool ns_capable(struct user_namespace *ns, int cap) in ns_capable() 379 bool ns_capable_noaudit(struct user_namespace *ns, int cap) in ns_capable_noaudit() 398 bool ns_capable_setid(struct user_namespace *ns, int cap) in ns_capable_setid() 433 bool file_ns_capable(const struct file *file, struct user_namespace *ns, in file_ns_capable() 455 bool privileged_wrt_inode_uidgid(struct user_namespace *ns, in privileged_wrt_inode_uidgid() 476 struct user_namespace *ns = current_user_ns(); in capable_wrt_inode_uidgid() 491 bool ptracer_capable(struct task_struct *tsk, struct user_namespace *ns) in ptracer_capable()
|
| H A D | ucount.c | 45 struct user_namespace *user_ns = in set_permissions() 46 container_of(head->set, struct user_namespace, set); in set_permissions() 95 bool setup_userns_sysctls(struct user_namespace *ns) in setup_userns_sysctls() 120 void retire_userns_sysctls(struct user_namespace *ns) in retire_userns_sysctls() 132 static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, in find_ucounts() 157 struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid) in alloc_ucounts() 214 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, in inc_ucount() 218 struct user_namespace *tns; in inc_ucount()
|
| H A D | utsname.c | 21 static struct ucounts *inc_uts_namespaces(struct user_namespace *ns) in inc_uts_namespaces() 36 static struct uts_namespace *clone_uts_ns(struct user_namespace *user_ns, in clone_uts_ns() 80 struct user_namespace *user_ns, struct uts_namespace *old_ns) in copy_utsname() 142 static struct user_namespace *utsns_owner(struct ns_common *ns) in utsns_owner()
|
| /linux/include/linux/ns/ |
| H A D | ns_common_types.h | 19 struct user_namespace; 28 extern struct user_namespace init_user_ns; 138 struct user_namespace *: &(__ns)->ns, \ 139 const struct user_namespace *: &(__ns)->ns, \ 151 struct user_namespace *: USER_NS_INIT_INO, \ 162 struct user_namespace *: &init_user_ns, \ 173 struct user_namespace *: USER_NS_INIT_ID, \ 184 struct user_namespace *: (IS_ENABLED(CONFIG_USER_NS) ? &userns_operations : NULL), \ 195 struct user_namespace *: CLONE_NEWUSER, \
|
| /linux/security/ |
| H A D | commoncap_test.c | 95 struct user_namespace *init_ns; in test_kuid_root_in_ns_init_ns_uid0() 115 struct user_namespace *init_ns; in test_kuid_root_in_ns_init_ns_nonzero() 136 static struct user_namespace *create_test_user_ns_with_mapping(struct kunit *test, in create_test_user_ns_with_mapping() 137 struct user_namespace *parent_ns, in create_test_user_ns_with_mapping() 140 struct user_namespace *ns; in create_test_user_ns_with_mapping() 201 struct user_namespace *test_ns; in test_kuid_root_in_ns_with_mapping() 202 struct user_namespace *parent_ns; in test_kuid_root_in_ns_with_mapping() 237 struct user_namespace *ns1, *ns2, *ns3; in test_kuid_root_in_ns_with_different_mappings()
|
| H A D | commoncap.c | 69 struct user_namespace *target_ns, in cap_capable_helper() 70 const struct user_namespace *cred_ns, in cap_capable_helper() 73 struct user_namespace *ns = target_ns; in cap_capable_helper() 124 int cap_capable(const struct cred *cred, struct user_namespace *target_ns, in cap_capable() 127 const struct user_namespace *cred_ns = cred->user_ns; in cap_capable() 368 static bool kuid_root_in_ns(kuid_t kuid, struct user_namespace *ns) in kuid_root_in_ns() 433 struct user_namespace *fs_ns; in cap_inode_getsecurity() 534 struct user_namespace *task_ns) in rootid_from_xattr() 577 struct user_namespace *task_ns = current_user_ns(), in cap_convert_nscap() 686 struct user_namespace *fs_ns; in get_vfs_caps_from_disk() [all …]
|
| /linux/include/trace/events/ |
| H A D | capability.h | 28 TP_PROTO(const struct cred *cred, struct user_namespace *target_ns, 29 const struct user_namespace *capable_ns, int cap, int ret), 35 __field(struct user_namespace *, target_ns) 36 __field(const struct user_namespace *, capable_ns)
|
| /linux/fs/ |
| H A D | mnt_idmapping.c | 54 static inline bool initial_idmapping(const struct user_namespace *ns) in initial_idmapping() 81 struct user_namespace *fs_userns, in make_vfsuid() 121 struct user_namespace *fs_userns, kgid_t kgid) in make_vfsgid() 151 struct user_namespace *fs_userns, vfsuid_t vfsuid) in from_vfsuid() 180 struct user_namespace *fs_userns, vfsgid_t vfsgid) in from_vfsgid() 287 struct mnt_idmap *alloc_mnt_idmap(struct user_namespace *mnt_userns) in alloc_mnt_idmap()
|
| /linux/security/keys/ |
| H A D | persistent.c | 20 static int key_create_persistent_register(struct user_namespace *ns) in key_create_persistent_register() 40 static key_ref_t key_create_persistent(struct user_namespace *ns, kuid_t uid, in key_create_persistent() 73 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()
|
| H A D | proc.c | 66 struct user_namespace *user_ns = seq_user_ns(p); in key_serial_next() 80 struct user_namespace *user_ns = seq_user_ns(p); in find_ge_key() 252 static struct rb_node *__key_user_next(struct user_namespace *user_ns, struct rb_node *n) in __key_user_next() 263 static struct rb_node *key_user_next(struct user_namespace *user_ns, struct rb_node *n) in key_user_next() 268 static struct rb_node *key_user_first(struct user_namespace *user_ns, struct rb_root *r) in key_user_first()
|
| /linux/ipc/ |
| H A D | namespace.c | 29 static struct ucounts *inc_ipc_namespaces(struct user_namespace *ns) in inc_ipc_namespaces() 39 static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns, in create_ipc_ns() 112 struct user_namespace *user_ns, struct ipc_namespace *ns) in copy_ipcs() 246 static struct user_namespace *ipcns_owner(struct ns_common *ns) in ipcns_owner()
|
| /linux/kernel/cgroup/ |
| H A D | namespace.c | 12 static struct ucounts *inc_cgroup_namespaces(struct user_namespace *ns) in inc_cgroup_namespaces() 49 struct user_namespace *user_ns, in copy_cgroup_ns() 133 static struct user_namespace *cgroupns_owner(struct ns_common *ns) in cgroupns_owner()
|