| /linux/include/linux/ |
| H A D | mnt_idmapping.h | 8 struct mnt_idmap; 11 extern struct mnt_idmap nop_mnt_idmap; 12 extern struct mnt_idmap invalid_mnt_idmap; 28 static inline bool is_valid_mnt_idmap(const struct mnt_idmap *idmap) in is_valid_mnt_idmap() 124 struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap); 125 void mnt_idmap_put(struct mnt_idmap *idmap); 127 vfsuid_t make_vfsuid(struct mnt_idmap *idmap, 130 vfsgid_t make_vfsgid(struct mnt_idmap *idmap, 133 kuid_t from_vfsuid(struct mnt_idmap *idmap, 136 kgid_t from_vfsgid(struct mnt_idmap *idmap, [all …]
|
| H A D | posix_acl.h | 77 int set_posix_acl(struct mnt_idmap *, struct dentry *, int, 84 int posix_acl_chmod(struct mnt_idmap *, struct dentry *, umode_t); 87 int posix_acl_update_mode(struct mnt_idmap *, struct inode *, umode_t *, 90 int simple_set_acl(struct mnt_idmap *, struct dentry *, 99 int posix_acl_permission(struct mnt_idmap *, struct inode *, 108 int vfs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, 110 struct posix_acl *vfs_get_acl(struct mnt_idmap *idmap, 112 int vfs_remove_acl(struct mnt_idmap *idmap, struct dentry *dentry, 117 static inline int posix_acl_chmod(struct mnt_idmap *idmap, in posix_acl_chmod() 144 static inline int vfs_set_acl(struct mnt_idmap *idmap, in vfs_set_acl() [all …]
|
| H A D | xattr.h | 49 struct mnt_idmap *idmap, struct dentry *dentry, 79 ssize_t vfs_getxattr(struct mnt_idmap *, struct dentry *, const char *, 82 int __vfs_setxattr(struct mnt_idmap *, struct dentry *, struct inode *, 84 int __vfs_setxattr_noperm(struct mnt_idmap *, struct dentry *, 86 int __vfs_setxattr_locked(struct mnt_idmap *, struct dentry *, 89 int vfs_setxattr(struct mnt_idmap *, struct dentry *, const char *, 91 int __vfs_removexattr(struct mnt_idmap *, struct dentry *, const char *); 92 int __vfs_removexattr_locked(struct mnt_idmap *, struct dentry *, 94 int vfs_removexattr(struct mnt_idmap *, struct dentry *, const char *); 97 int vfs_getxattr_alloc(struct mnt_idmap *idmap,
|
| H A D | mount.h | 19 struct mnt_idmap; 62 struct mnt_idmap *mnt_idmap; member 65 static inline struct mnt_idmap *mnt_idmap(const struct vfsmount *mnt) in mnt_idmap() function 68 return READ_ONCE(mnt->mnt_idmap); in mnt_idmap()
|
| H A D | fs.h | 1626 static inline vfsuid_t i_uid_into_vfsuid(struct mnt_idmap *idmap, in i_uid_into_vfsuid() 1643 static inline bool i_uid_needs_update(struct mnt_idmap *idmap, in i_uid_needs_update() 1661 static inline void i_uid_update(struct mnt_idmap *idmap, in i_uid_update() 1678 static inline vfsgid_t i_gid_into_vfsgid(struct mnt_idmap *idmap, in i_gid_into_vfsgid() 1695 static inline bool i_gid_needs_update(struct mnt_idmap *idmap, in i_gid_needs_update() 1713 static inline void i_gid_update(struct mnt_idmap *idmap, in i_gid_update() 1731 struct mnt_idmap *idmap) in inode_fsuid_set() 1745 struct mnt_idmap *idmap) in inode_fsgid_set() 1762 struct mnt_idmap *idmap) in fsuidgid_has_mapping() 2107 bool inode_owner_or_capable(struct mnt_idmap *idmap, [all …]
|
| H A D | capability.h | 42 struct mnt_idmap; 184 struct mnt_idmap *idmap, 186 bool capable_wrt_inode_uidgid(struct mnt_idmap *idmap, 207 int get_vfs_caps_from_disk(struct mnt_idmap *idmap, 211 int cap_convert_nscap(struct mnt_idmap *idmap, struct dentry *dentry,
|
| H A D | namei.h | 81 struct dentry *lookup_one(struct mnt_idmap *, struct qstr *, struct dentry *); 82 struct dentry *lookup_one_unlocked(struct mnt_idmap *idmap, 84 struct dentry *lookup_one_positive_unlocked(struct mnt_idmap *idmap, 87 struct dentry *lookup_one_positive_killable(struct mnt_idmap *idmap,
|
| H A D | security.h | 188 int cap_inode_removexattr(struct mnt_idmap *idmap, 191 int cap_inode_killpriv(struct mnt_idmap *idmap, struct dentry *dentry); 192 int cap_inode_getsecurity(struct mnt_idmap *idmap, 408 void security_inode_post_create_tmpfile(struct mnt_idmap *idmap, 425 int security_inode_setattr(struct mnt_idmap *idmap, 427 void security_inode_post_setattr(struct mnt_idmap *idmap, struct dentry *dentry, 430 int security_inode_setxattr(struct mnt_idmap *idmap, 433 int security_inode_set_acl(struct mnt_idmap *idmap, 438 int security_inode_get_acl(struct mnt_idmap *idmap, 440 int security_inode_remove_acl(struct mnt_idmap *idmap, [all …]
|
| /linux/fs/smb/server/ |
| H A D | vfs.h | 76 void ksmbd_vfs_query_maximal_access(struct mnt_idmap *idmap, 104 ssize_t ksmbd_vfs_getxattr(struct mnt_idmap *idmap, 108 ssize_t ksmbd_vfs_casexattr_len(struct mnt_idmap *idmap, 111 int ksmbd_vfs_setxattr(struct mnt_idmap *idmap, 117 int ksmbd_vfs_remove_xattr(struct mnt_idmap *idmap, 142 struct mnt_idmap *idmap, 147 int ksmbd_vfs_remove_acl_xattrs(struct mnt_idmap *idmap, 149 int ksmbd_vfs_remove_sd_xattrs(struct mnt_idmap *idmap, const struct path *path); 151 struct mnt_idmap *idmap, 156 struct mnt_idmap *idmap, [all …]
|
| H A D | smbacl.h | 84 int parse_sec_desc(struct mnt_idmap *idmap, struct smb_ntsd *pntsd, 86 int build_sec_desc(struct mnt_idmap *idmap, struct smb_ntsd *pntsd, 105 static inline uid_t posix_acl_uid_translate(struct mnt_idmap *idmap, in posix_acl_uid_translate() 117 static inline gid_t posix_acl_gid_translate(struct mnt_idmap *idmap, in posix_acl_gid_translate()
|
| H A D | vfs.c | 145 void ksmbd_vfs_query_maximal_access(struct mnt_idmap *idmap, in ksmbd_vfs_query_maximal_access() 191 err = vfs_create(mnt_idmap(path.mnt), d_inode(path.dentry), in ksmbd_vfs_create() 214 struct mnt_idmap *idmap; in ksmbd_vfs_mkdir() 230 idmap = mnt_idmap(path.mnt); in ksmbd_vfs_mkdir() 247 static ssize_t ksmbd_vfs_getcasexattr(struct mnt_idmap *idmap, in ksmbd_vfs_getcasexattr() 412 struct mnt_idmap *idmap = file_mnt_idmap(fp->filp); in ksmbd_vfs_stream_write() 598 struct mnt_idmap *idmap; in ksmbd_vfs_remove_file() 610 idmap = mnt_idmap(path->mnt); in ksmbd_vfs_remove_file() 666 err = vfs_link(oldpath.dentry, mnt_idmap(newpath.mnt), in ksmbd_vfs_link() 774 rd.mnt_idmap = mnt_idmap(old_path->mnt), in ksmbd_vfs_rename() [all …]
|
| /linux/fs/ |
| H A D | mnt_idmapping.c | 20 struct mnt_idmap { struct 31 struct mnt_idmap nop_mnt_idmap = { argument 40 struct mnt_idmap invalid_mnt_idmap = { 80 vfsuid_t make_vfsuid(struct mnt_idmap *idmap, in make_vfsuid() 120 vfsgid_t make_vfsgid(struct mnt_idmap *idmap, in make_vfsgid() 150 kuid_t from_vfsuid(struct mnt_idmap *idmap, in from_vfsuid() 179 kgid_t from_vfsgid(struct mnt_idmap *idmap, in from_vfsgid() 274 static void free_mnt_idmap(struct mnt_idmap *idmap) in free_mnt_idmap() 287 struct mnt_idmap *alloc_mnt_idmap(struct user_namespace *mnt_userns) in alloc_mnt_idmap() 289 struct mnt_idmap *idmap; in alloc_mnt_idmap() [all …]
|
| H A D | internal.h | 19 struct mnt_idmap; 59 int may_linkat(struct mnt_idmap *idmap, const struct path *link); 66 int vfs_tmpfile(struct mnt_idmap *idmap, 207 int dentry_needs_remove_privs(struct mnt_idmap *, struct dentry *dentry); 208 bool in_group_or_capable(struct mnt_idmap *idmap, 295 int may_write_xattr(struct mnt_idmap *idmap, struct inode *inode); 298 int do_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, 300 ssize_t do_get_acl(struct mnt_idmap *idmap, struct dentry *dentry, 303 static inline int do_set_acl(struct mnt_idmap *idmap, in do_set_acl() 309 static inline ssize_t do_get_acl(struct mnt_idmap *idmap, in do_get_acl() [all …]
|
| H A D | bad_inode.c | 30 static int bad_inode_create(struct mnt_idmap *idmap, in bad_inode_create() 54 static int bad_inode_symlink(struct mnt_idmap *idmap, in bad_inode_symlink() 61 static struct dentry *bad_inode_mkdir(struct mnt_idmap *idmap, struct inode *dir, in bad_inode_mkdir() 72 static int bad_inode_mknod(struct mnt_idmap *idmap, struct inode *dir, in bad_inode_mknod() 78 static int bad_inode_rename2(struct mnt_idmap *idmap, in bad_inode_rename2() 92 static int bad_inode_permission(struct mnt_idmap *idmap, in bad_inode_permission() 98 static int bad_inode_getattr(struct mnt_idmap *idmap, in bad_inode_getattr() 105 static int bad_inode_setattr(struct mnt_idmap *idmap, in bad_inode_setattr() 148 static int bad_inode_tmpfile(struct mnt_idmap *idmap, in bad_inode_tmpfile() 155 static int bad_inode_set_acl(struct mnt_idmap *idmap, in bad_inode_set_acl()
|
| H A D | attr.c | 33 int setattr_should_drop_sgid(struct mnt_idmap *idmap, in setattr_should_drop_sgid() 63 int setattr_should_drop_suidgid(struct mnt_idmap *idmap, in setattr_should_drop_suidgid() 94 static bool chown_ok(struct mnt_idmap *idmap, in chown_ok() 121 static bool chgrp_ok(struct mnt_idmap *idmap, in chgrp_ok() 161 int setattr_prepare(struct mnt_idmap *idmap, struct dentry *dentry, in setattr_prepare() 332 void setattr_copy(struct mnt_idmap *idmap, struct inode *inode, in setattr_copy() 362 int may_setattr(struct mnt_idmap *idmap, struct inode *inode, in may_setattr() 417 int notify_change(struct mnt_idmap *idmap, struct dentry *dentry, in notify_change()
|
| H A D | xattr.c | 97 int may_write_xattr(struct mnt_idmap *idmap, struct inode *inode) in may_write_xattr() 113 xattr_permission(struct mnt_idmap *idmap, struct inode *inode, in xattr_permission() 184 __vfs_setxattr(struct mnt_idmap *idmap, struct dentry *dentry, in __vfs_setxattr() 222 int __vfs_setxattr_noperm(struct mnt_idmap *idmap, in __vfs_setxattr_noperm() 275 __vfs_setxattr_locked(struct mnt_idmap *idmap, struct dentry *dentry, in __vfs_setxattr_locked() 304 vfs_setxattr(struct mnt_idmap *idmap, struct dentry *dentry, in vfs_setxattr() 338 xattr_getsecurity(struct mnt_idmap *idmap, struct inode *inode, in xattr_getsecurity() 375 vfs_getxattr_alloc(struct mnt_idmap *idmap, struct dentry *dentry, in vfs_getxattr_alloc() 428 vfs_getxattr(struct mnt_idmap *idmap, struct dentry *dentry, in vfs_getxattr() 504 __vfs_removexattr(struct mnt_idmap *idmap, struct dentry *dentry, in __vfs_removexattr() [all …]
|
| H A D | posix_acl.c | 114 static struct posix_acl *__get_acl(struct mnt_idmap *idmap, in __get_acl() 374 posix_acl_permission(struct mnt_idmap *idmap, struct inode *inode, in posix_acl_permission() 604 posix_acl_chmod(struct mnt_idmap *idmap, struct dentry *dentry, in posix_acl_chmod() 705 int posix_acl_update_mode(struct mnt_idmap *idmap, in posix_acl_update_mode() 886 static ssize_t vfs_posix_acl_to_xattr(struct mnt_idmap *idmap, in vfs_posix_acl_to_xattr() 934 set_posix_acl(struct mnt_idmap *idmap, struct dentry *dentry, in set_posix_acl() 1015 int simple_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, in simple_set_acl() 1054 static int vfs_set_acl_idmapped_mnt(struct mnt_idmap *idmap, in vfs_set_acl_idmapped_mnt() 1088 int vfs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, in vfs_set_acl() 1165 struct posix_acl *vfs_get_acl(struct mnt_idmap *idmap, in vfs_get_acl() [all …]
|
| H A D | init.c | 159 error = vfs_mknod(mnt_idmap(path.mnt), path.dentry->d_inode, in init_mknod() 169 struct mnt_idmap *idmap; in init_link() 184 idmap = mnt_idmap(new_path.mnt); in init_link() 211 error = vfs_symlink(mnt_idmap(path.mnt), path.dentry->d_inode, in init_symlink() 235 dentry = vfs_mkdir(mnt_idmap(path.mnt), path.dentry->d_inode, in init_mkdir()
|
| /linux/fs/smb/client/ |
| H A D | cifsfs.h | 52 extern int cifs_create(struct mnt_idmap *, struct inode *, 60 extern int cifs_mknod(struct mnt_idmap *, struct inode *, struct dentry *, 62 extern struct dentry *cifs_mkdir(struct mnt_idmap *, struct inode *, struct dentry *, 65 extern int cifs_rename2(struct mnt_idmap *, struct inode *, 74 extern int cifs_getattr(struct mnt_idmap *, const struct path *, 76 extern int cifs_setattr(struct mnt_idmap *, struct dentry *, 120 extern int cifs_symlink(struct mnt_idmap *idmap, struct inode *inode,
|
| /linux/security/integrity/evm/ |
| H A D | evm_main.c | 461 static int evm_xattr_change(struct mnt_idmap *idmap, in evm_xattr_change() 497 static int evm_protect_xattr(struct mnt_idmap *idmap, in evm_protect_xattr() 587 static int evm_inode_setxattr(struct mnt_idmap *idmap, struct dentry *dentry, in evm_inode_setxattr() 619 static int evm_inode_removexattr(struct mnt_idmap *idmap, struct dentry *dentry, in evm_inode_removexattr() 632 static int evm_inode_set_acl_change(struct mnt_idmap *idmap, in evm_inode_set_acl_change() 651 static inline int evm_inode_set_acl_change(struct mnt_idmap *idmap, in evm_inode_set_acl_change() 673 static int evm_inode_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, in evm_inode_set_acl() 725 static int evm_inode_remove_acl(struct mnt_idmap *idmap, struct dentry *dentry, in evm_inode_remove_acl() 878 static inline void evm_inode_post_remove_acl(struct mnt_idmap *idmap, in evm_inode_post_remove_acl() 885 static int evm_attr_change(struct mnt_idmap *idmap, in evm_attr_change() [all …]
|
| /linux/fs/minix/ |
| H A D | namei.c | 36 static int minix_mknod(struct mnt_idmap *idmap, struct inode *dir, in minix_mknod() 53 static int minix_tmpfile(struct mnt_idmap *idmap, struct inode *dir, in minix_tmpfile() 66 static int minix_create(struct mnt_idmap *idmap, struct inode *dir, in minix_create() 72 static int minix_symlink(struct mnt_idmap *idmap, struct inode *dir, in minix_symlink() 107 static struct dentry *minix_mkdir(struct mnt_idmap *idmap, struct inode *dir, in minix_mkdir() 176 static int minix_rename(struct mnt_idmap *idmap, in minix_rename()
|
| /linux/fs/coda/ |
| H A D | coda_linux.h | 49 int coda_permission(struct mnt_idmap *idmap, struct inode *inode, 52 int coda_getattr(struct mnt_idmap *, const struct path *, struct kstat *, 54 int coda_setattr(struct mnt_idmap *, struct dentry *, struct iattr *);
|
| /linux/fs/ocfs2/ |
| H A D | file.h | 53 int ocfs2_setattr(struct mnt_idmap *idmap, struct dentry *dentry, 55 int ocfs2_getattr(struct mnt_idmap *idmap, const struct path *path, 57 int ocfs2_permission(struct mnt_idmap *idmap,
|
| /linux/fs/ramfs/ |
| H A D | inode.c | 98 ramfs_mknod(struct mnt_idmap *idmap, struct inode *dir, in ramfs_mknod() 122 static struct dentry *ramfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, in ramfs_mkdir() 131 static int ramfs_create(struct mnt_idmap *idmap, struct inode *dir, in ramfs_create() 137 static int ramfs_symlink(struct mnt_idmap *idmap, struct inode *dir, in ramfs_symlink() 168 static int ramfs_tmpfile(struct mnt_idmap *idmap, in ramfs_tmpfile()
|
| /linux/fs/btrfs/ |
| H A D | acl.h | 14 struct mnt_idmap; 18 int btrfs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|