Home
last modified time | relevance | path

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

12345678910>>...16

/linux-6.1.9/include/linux/
Dmnt_idmapping.h8 struct user_namespace;
14 extern struct user_namespace init_user_ns;
148 static inline bool initial_idmapping(const struct user_namespace *ns) in initial_idmapping()
167 static inline bool no_idmapping(const struct user_namespace *mnt_userns, in no_idmapping()
168 const struct user_namespace *fs_userns) in no_idmapping()
194 static inline vfsuid_t make_vfsuid(struct user_namespace *mnt_userns, in make_vfsuid()
195 struct user_namespace *fs_userns, in make_vfsuid()
211 static inline kuid_t mapped_kuid_fs(struct user_namespace *mnt_userns, in mapped_kuid_fs()
212 struct user_namespace *fs_userns, in mapped_kuid_fs()
239 static inline vfsgid_t make_vfsgid(struct user_namespace *mnt_userns, in make_vfsgid()
[all …]
Duser_namespace.h68 struct user_namespace { struct
72 struct user_namespace *parent; argument
109 struct user_namespace *ns; argument
116 extern struct user_namespace init_user_ns;
119 bool setup_userns_sysctls(struct user_namespace *ns);
120 void retire_userns_sysctls(struct user_namespace *ns);
121 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type);
123 struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid);
138 static inline long get_userns_rlimit_max(struct user_namespace *ns, enum rlimit_type type) in get_userns_rlimit_max()
143 static inline void set_userns_rlimit_max(struct user_namespace *ns, in set_userns_rlimit_max()
[all …]
Duidgid.h18 struct user_namespace;
19 extern struct user_namespace init_user_ns;
123 extern kuid_t make_kuid(struct user_namespace *from, uid_t uid);
124 extern kgid_t make_kgid(struct user_namespace *from, gid_t gid);
126 extern uid_t from_kuid(struct user_namespace *to, kuid_t uid);
127 extern gid_t from_kgid(struct user_namespace *to, kgid_t gid);
128 extern uid_t from_kuid_munged(struct user_namespace *to, kuid_t uid);
129 extern gid_t from_kgid_munged(struct user_namespace *to, kgid_t gid);
131 static inline bool kuid_has_mapping(struct user_namespace *ns, kuid_t uid) in kuid_has_mapping()
136 static inline bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid) in kgid_has_mapping()
[all …]
Dcapability.h44 struct user_namespace;
206 struct user_namespace *ns, int cap);
209 struct user_namespace *ns, int cap);
211 extern bool ns_capable(struct user_namespace *ns, int cap);
212 extern bool ns_capable_noaudit(struct user_namespace *ns, int cap);
213 extern bool ns_capable_setid(struct user_namespace *ns, int cap);
220 struct user_namespace *ns, int cap) in has_ns_capability()
229 struct user_namespace *ns, int cap) in has_ns_capability_noaudit()
237 static inline bool ns_capable(struct user_namespace *ns, int cap) in ns_capable()
241 static inline bool ns_capable_noaudit(struct user_namespace *ns, int cap) in ns_capable_noaudit()
[all …]
Dprojid.h17 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()
Dxattr.h39 struct user_namespace *mnt_userns, struct dentry *dentry,
53 ssize_t vfs_getxattr(struct user_namespace *, struct dentry *, const char *,
56 int __vfs_setxattr(struct user_namespace *, struct dentry *, struct inode *,
58 int __vfs_setxattr_noperm(struct user_namespace *, struct dentry *,
60 int __vfs_setxattr_locked(struct user_namespace *, struct dentry *,
63 int vfs_setxattr(struct user_namespace *, struct dentry *, const char *,
65 int __vfs_removexattr(struct user_namespace *, struct dentry *, const char *);
66 int __vfs_removexattr_locked(struct user_namespace *, struct dentry *,
68 int vfs_removexattr(struct user_namespace *, struct dentry *, const char *);
71 ssize_t vfs_getxattr_alloc(struct user_namespace *mnt_userns,
Dposix_acl.h18 struct user_namespace;
72 extern int set_posix_acl(struct user_namespace *, struct inode *, int,
79 int posix_acl_chmod(struct user_namespace *, struct inode *, umode_t);
82 int posix_acl_update_mode(struct user_namespace *, struct inode *, umode_t *,
85 extern int simple_set_acl(struct user_namespace *, struct inode *,
93 int posix_acl_valid(struct user_namespace *, const struct posix_acl *);
94 int posix_acl_permission(struct user_namespace *, struct inode *,
103 static inline int posix_acl_chmod(struct user_namespace *mnt_userns, in posix_acl_chmod()
Dposix_acl_xattr.h38 void posix_acl_getxattr_idmapped_mnt(struct user_namespace *mnt_userns,
49 posix_acl_getxattr_idmapped_mnt(struct user_namespace *mnt_userns, in posix_acl_getxattr_idmapped_mnt()
56 struct posix_acl *posix_acl_from_xattr(struct user_namespace *user_ns,
58 int posix_acl_to_xattr(struct user_namespace *user_ns,
60 struct posix_acl *vfs_set_acl_prepare(struct user_namespace *mnt_userns,
61 struct user_namespace *fs_userns,
Dutsname.h21 struct user_namespace;
22 extern struct user_namespace init_user_ns;
26 struct user_namespace *user_ns;
39 struct user_namespace *user_ns, struct uts_namespace *old_ns);
59 struct user_namespace *user_ns, struct uts_namespace *old_ns) in copy_utsname()
Devm.h24 extern int evm_inode_setattr(struct user_namespace *mnt_userns,
27 extern int evm_inode_setxattr(struct user_namespace *mnt_userns,
34 extern int evm_inode_removexattr(struct user_namespace *mnt_userns,
72 static inline int evm_inode_setattr(struct user_namespace *mnt_userns, in evm_inode_setattr()
83 static inline int evm_inode_setxattr(struct user_namespace *mnt_userns, in evm_inode_setxattr()
98 static inline int evm_inode_removexattr(struct user_namespace *mnt_userns, in evm_inode_removexattr()
Dima.h21 extern void ima_post_create_tmpfile(struct user_namespace *mnt_userns,
33 extern void ima_post_path_mknod(struct user_namespace *mnt_userns,
69 static inline void ima_post_create_tmpfile(struct user_namespace *mnt_userns, in ima_post_create_tmpfile()
114 static inline void ima_post_path_mknod(struct user_namespace *mnt_userns, in ima_post_path_mknod()
186 extern void ima_inode_post_setattr(struct user_namespace *mnt_userns,
197 static inline void ima_inode_post_setattr(struct user_namespace *mnt_userns, in ima_inode_post_setattr()
Dtime_namespace.h11 struct user_namespace;
12 extern struct user_namespace init_user_ns;
20 struct user_namespace *user_ns;
43 struct user_namespace *user_ns,
129 struct user_namespace *user_ns, in copy_time_ns()
Dfs.h1564 struct user_namespace *s_user_ns;
1591 static inline struct user_namespace *i_user_ns(const struct inode *inode) in i_user_ns()
1632 static inline kuid_t i_uid_into_mnt(struct user_namespace *mnt_userns, in i_uid_into_mnt()
1646 static inline vfsuid_t i_uid_into_vfsuid(struct user_namespace *mnt_userns, in i_uid_into_vfsuid()
1663 static inline bool i_uid_needs_update(struct user_namespace *mnt_userns, in i_uid_needs_update()
1681 static inline void i_uid_update(struct user_namespace *mnt_userns, in i_uid_update()
1701 static inline kgid_t i_gid_into_mnt(struct user_namespace *mnt_userns, in i_gid_into_mnt()
1715 static inline vfsgid_t i_gid_into_vfsgid(struct user_namespace *mnt_userns, in i_gid_into_vfsgid()
1732 static inline bool i_gid_needs_update(struct user_namespace *mnt_userns, in i_gid_needs_update()
1750 static inline void i_gid_update(struct user_namespace *mnt_userns, in i_gid_update()
[all …]
Dipc_namespace.h16 struct user_namespace;
75 struct user_namespace *user_ns;
133 struct user_namespace *user_ns, struct ipc_namespace *ns);
155 struct user_namespace *user_ns, struct ipc_namespace *ns) in copy_ipcs()
Dpid_namespace.h30 struct user_namespace *user_ns;
49 struct user_namespace *user_ns, struct pid_namespace *ns);
63 struct user_namespace *user_ns, struct pid_namespace *ns) in copy_pid_ns()
/linux-6.1.9/fs/ksmbd/
Dvfs.h74 int ksmbd_vfs_lock_parent(struct user_namespace *user_ns, struct dentry *parent,
76 int ksmbd_vfs_may_delete(struct user_namespace *user_ns, struct dentry *dentry);
77 int ksmbd_vfs_query_maximal_access(struct user_namespace *user_ns,
105 ssize_t ksmbd_vfs_getxattr(struct user_namespace *user_ns,
109 ssize_t ksmbd_vfs_casexattr_len(struct user_namespace *user_ns,
112 int ksmbd_vfs_setxattr(struct user_namespace *user_ns,
117 int ksmbd_vfs_remove_xattr(struct user_namespace *user_ns,
134 int ksmbd_vfs_unlink(struct user_namespace *user_ns,
138 struct user_namespace *user_ns,
144 int ksmbd_vfs_remove_acl_xattrs(struct user_namespace *user_ns,
[all …]
/linux-6.1.9/kernel/
Duser_namespace.c29 struct user_namespace *ns, int cap_setid,
33 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces()
43 static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns) in set_cred_user_ns()
84 struct user_namespace *ns, *parent_ns = new->user_ns; in create_user_ns()
198 struct user_namespace *parent, *ns = in free_user_ns()
199 container_of(work, struct user_namespace, work); in free_user_ns()
225 void __put_user_ns(struct user_namespace *ns) in __put_user_ns()
408 kuid_t make_kuid(struct user_namespace *ns, uid_t uid) in make_kuid()
427 uid_t from_kuid(struct user_namespace *targ, kuid_t kuid) in from_kuid()
452 uid_t from_kuid_munged(struct user_namespace *targ, kuid_t kuid) in from_kuid_munged()
[all …]
Dcapability.c295 struct user_namespace *ns, int cap) in has_ns_capability()
336 struct user_namespace *ns, int cap) in has_ns_capability_noaudit()
365 static bool ns_capable_common(struct user_namespace *ns, in ns_capable_common()
395 bool ns_capable(struct user_namespace *ns, int cap) in ns_capable()
413 bool ns_capable_noaudit(struct user_namespace *ns, int cap) in ns_capable_noaudit()
432 bool ns_capable_setid(struct user_namespace *ns, int cap) in ns_capable_setid()
467 bool file_ns_capable(const struct file *file, struct user_namespace *ns, in file_ns_capable()
488 bool privileged_wrt_inode_uidgid(struct user_namespace *ns, in privileged_wrt_inode_uidgid()
489 struct user_namespace *mnt_userns, in privileged_wrt_inode_uidgid()
505 bool capable_wrt_inode_uidgid(struct user_namespace *mnt_userns, in capable_wrt_inode_uidgid()
[all …]
Ducount.c43 struct user_namespace *user_ns = in set_permissions()
44 container_of(head->set, struct user_namespace, set); in set_permissions()
94 bool setup_userns_sysctls(struct user_namespace *ns) in setup_userns_sysctls()
118 void retire_userns_sysctls(struct user_namespace *ns) in retire_userns_sysctls()
130 static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, struct hlist_head *hashe… in find_ucounts()
164 struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid) in alloc_ucounts()
229 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, in inc_ucount()
233 struct user_namespace *tns; in inc_ucount()
/linux-6.1.9/fs/
Dbad_inode.c30 static int bad_inode_create(struct user_namespace *mnt_userns, in bad_inode_create()
54 static int bad_inode_symlink(struct user_namespace *mnt_userns, in bad_inode_symlink()
61 static int bad_inode_mkdir(struct user_namespace *mnt_userns, struct inode *dir, in bad_inode_mkdir()
72 static int bad_inode_mknod(struct user_namespace *mnt_userns, struct inode *dir, in bad_inode_mknod()
78 static int bad_inode_rename2(struct user_namespace *mnt_userns, in bad_inode_rename2()
92 static int bad_inode_permission(struct user_namespace *mnt_userns, in bad_inode_permission()
98 static int bad_inode_getattr(struct user_namespace *mnt_userns, in bad_inode_getattr()
105 static int bad_inode_setattr(struct user_namespace *mnt_userns, in bad_inode_setattr()
149 static int bad_inode_tmpfile(struct user_namespace *mnt_userns, in bad_inode_tmpfile()
156 static int bad_inode_set_acl(struct user_namespace *mnt_userns, in bad_inode_set_acl()
Dposix_acl.c223 posix_acl_valid(struct user_namespace *user_ns, const struct posix_acl *acl) in posix_acl_valid()
361 posix_acl_permission(struct user_namespace *mnt_userns, struct inode *inode, in posix_acl_permission()
365 struct user_namespace *fs_userns = i_user_ns(inode); in posix_acl_permission()
591 posix_acl_chmod(struct user_namespace *mnt_userns, struct inode *inode, in posix_acl_chmod()
691 int posix_acl_update_mode(struct user_namespace *mnt_userns, in posix_acl_update_mode()
735 void posix_acl_getxattr_idmapped_mnt(struct user_namespace *mnt_userns, in posix_acl_getxattr_idmapped_mnt()
741 struct user_namespace *fs_userns = i_user_ns(inode); in posix_acl_getxattr_idmapped_mnt()
776 struct user_namespace *to, struct user_namespace *from, in posix_acl_fix_xattr_userns()
807 struct user_namespace *user_ns = current_user_ns(); in posix_acl_fix_xattr_from_user()
815 struct user_namespace *user_ns = current_user_ns(); in posix_acl_fix_xattr_to_user()
[all …]
/linux-6.1.9/fs/cifs/
Dcifsfs.h52 extern int cifs_create(struct user_namespace *, struct inode *,
60 extern int cifs_mknod(struct user_namespace *, struct inode *, struct dentry *,
62 extern int cifs_mkdir(struct user_namespace *, struct inode *, struct dentry *,
65 extern int cifs_rename2(struct user_namespace *, struct inode *,
75 extern int cifs_getattr(struct user_namespace *, const struct path *,
77 extern int cifs_setattr(struct user_namespace *, struct dentry *,
127 extern int cifs_symlink(struct user_namespace *mnt_userns, struct inode *inode,
/linux-6.1.9/security/keys/
Dpersistent.c20 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()
/linux-6.1.9/fs/minix/
Dnamei.c36 static int minix_mknod(struct user_namespace *mnt_userns, struct inode *dir, in minix_mknod()
55 static int minix_tmpfile(struct user_namespace *mnt_userns, struct inode *dir, in minix_tmpfile()
68 static int minix_create(struct user_namespace *mnt_userns, struct inode *dir, in minix_create()
74 static int minix_symlink(struct user_namespace *mnt_userns, struct inode *dir, in minix_symlink()
114 static int minix_mkdir(struct user_namespace *mnt_userns, struct inode *dir, in minix_mkdir()
187 static int minix_rename(struct user_namespace *mnt_userns, in minix_rename()
/linux-6.1.9/security/
Dcommoncap.c66 int cap_capable(const struct cred *cred, struct user_namespace *targ_ns, in cap_capable()
69 struct user_namespace *ns = targ_ns; in cap_capable()
321 int cap_inode_killpriv(struct user_namespace *mnt_userns, struct dentry *dentry) in cap_inode_killpriv()
333 struct user_namespace *ns; in rootid_owns_currentns()
378 int cap_inode_getsecurity(struct user_namespace *mnt_userns, in cap_inode_getsecurity()
390 struct user_namespace *fs_ns; in cap_inode_getsecurity()
503 struct user_namespace *task_ns, in rootid_from_xattr()
504 struct user_namespace *mnt_userns, in rootid_from_xattr()
505 struct user_namespace *fs_userns) in rootid_from_xattr()
542 int cap_convert_nscap(struct user_namespace *mnt_userns, struct dentry *dentry, in cap_convert_nscap()
[all …]

12345678910>>...16