/kernel/linux/linux-5.10/fs/nfs/ |
H A D | nfs4idmap.c | 2 * fs/nfs/idmap.c 65 struct idmap *idmap; member 68 struct idmap { struct 76 static struct user_namespace *idmap_userns(const struct idmap *idmap) in idmap_userns() argument 78 if (idmap && idmap->user_ns) in idmap_userns() 79 return idmap->user_ns; in idmap_userns() 280 const char *type, struct idmap *idma in nfs_idmap_request_key() 279 nfs_idmap_request_key(const char *name, size_t namelen, const char *type, struct idmap *idmap) nfs_idmap_request_key() argument 305 nfs_idmap_get_key(const char *name, size_t namelen, const char *type, void *data, size_t data_size, struct idmap *idmap) nfs_idmap_get_key() argument 350 nfs_idmap_lookup_name(__u32 id, const char *type, char *buf, size_t buflen, struct idmap *idmap) nfs_idmap_lookup_name() argument 365 nfs_idmap_lookup_id(const char *name, size_t namelen, const char *type, __u32 *id, struct idmap *idmap) nfs_idmap_lookup_id() argument 426 struct idmap *idmap = pdo->pdo_data; nfs_idmap_pipe_destroy() local 438 struct idmap *idmap = pdo->pdo_data; nfs_idmap_pipe_create() local 457 struct idmap *idmap; nfs_idmap_new() local 498 struct idmap *idmap = clp->cl_idmap; nfs_idmap_delete() local 511 nfs_idmap_prepare_message(char *desc, struct idmap *idmap, struct idmap_msg *im, struct rpc_pipe_msg *msg) nfs_idmap_prepare_message() argument 553 nfs_idmap_prepare_pipe_upcall(struct idmap *idmap, struct idmap_legacy_upcalldata *data) nfs_idmap_prepare_pipe_upcall() argument 572 nfs_idmap_abort_pipe_upcall(struct idmap *idmap, struct idmap_legacy_upcalldata *data, int ret) nfs_idmap_abort_pipe_upcall() argument 586 struct idmap *idmap = (struct idmap *)aux; nfs_idmap_legacy_upcall() local 669 struct idmap *idmap = (struct idmap *)rpci->private; idmap_pipe_downcall() local 727 struct idmap *idmap = data->idmap; idmap_pipe_destroy_msg() local 737 struct idmap *idmap = (struct idmap *)rpci->private; idmap_release_pipe() local 747 struct idmap *idmap = server->nfs_client->cl_idmap; nfs_map_name_to_uid() local 764 struct idmap *idmap = server->nfs_client->cl_idmap; nfs_map_group_to_gid() local 781 struct idmap *idmap = server->nfs_client->cl_idmap; nfs_map_uid_to_name() local 795 struct idmap *idmap = server->nfs_client->cl_idmap; nfs_map_gid_to_group() local [all...] |
/kernel/linux/linux-6.6/fs/nfs/ |
H A D | nfs4idmap.c | 2 * fs/nfs/idmap.c 65 struct idmap *idmap; member 68 struct idmap { struct 76 static struct user_namespace *idmap_userns(const struct idmap *idmap) in idmap_userns() argument 78 if (idmap && idmap->user_ns) in idmap_userns() 79 return idmap->user_ns; in idmap_userns() 280 const char *type, struct idmap *idma in nfs_idmap_request_key() 279 nfs_idmap_request_key(const char *name, size_t namelen, const char *type, struct idmap *idmap) nfs_idmap_request_key() argument 305 nfs_idmap_get_key(const char *name, size_t namelen, const char *type, void *data, size_t data_size, struct idmap *idmap) nfs_idmap_get_key() argument 350 nfs_idmap_lookup_name(__u32 id, const char *type, char *buf, size_t buflen, struct idmap *idmap) nfs_idmap_lookup_name() argument 365 nfs_idmap_lookup_id(const char *name, size_t namelen, const char *type, __u32 *id, struct idmap *idmap) nfs_idmap_lookup_id() argument 426 struct idmap *idmap = pdo->pdo_data; nfs_idmap_pipe_destroy() local 438 struct idmap *idmap = pdo->pdo_data; nfs_idmap_pipe_create() local 457 struct idmap *idmap; nfs_idmap_new() local 498 struct idmap *idmap = clp->cl_idmap; nfs_idmap_delete() local 511 nfs_idmap_prepare_message(char *desc, struct idmap *idmap, struct idmap_msg *im, struct rpc_pipe_msg *msg) nfs_idmap_prepare_message() argument 553 nfs_idmap_prepare_pipe_upcall(struct idmap *idmap, struct idmap_legacy_upcalldata *data) nfs_idmap_prepare_pipe_upcall() argument 572 nfs_idmap_abort_pipe_upcall(struct idmap *idmap, struct idmap_legacy_upcalldata *data, int ret) nfs_idmap_abort_pipe_upcall() argument 586 struct idmap *idmap = aux; nfs_idmap_legacy_upcall() local 669 struct idmap *idmap = (struct idmap *)rpci->private; idmap_pipe_downcall() local 727 struct idmap *idmap = data->idmap; idmap_pipe_destroy_msg() local 737 struct idmap *idmap = (struct idmap *)rpci->private; idmap_release_pipe() local 747 struct idmap *idmap = server->nfs_client->cl_idmap; nfs_map_name_to_uid() local 764 struct idmap *idmap = server->nfs_client->cl_idmap; nfs_map_group_to_gid() local 781 struct idmap *idmap = server->nfs_client->cl_idmap; nfs_map_uid_to_name() local 795 struct idmap *idmap = server->nfs_client->cl_idmap; nfs_map_gid_to_group() local [all...] |
/kernel/linux/linux-6.6/fs/ |
H A D | mnt_idmapping.c | 30 * @idmap: idmap of the relevent mount 33 * Return: true if @idmap is allowed, false if not. 35 bool check_fsmapping(const struct mnt_idmap *idmap, in check_fsmapping() argument 38 return idmap->owner != sb->s_user_ns; in check_fsmapping() 77 * @idmap: the mount's idmapping 81 * Take a @kuid and remap it from @fs_userns into @idmap. Use this 91 * Return: @kuid mapped according to @idmap. 92 * If @kuid has no mapping in either @idmap or @fs_userns INVALID_UID is 96 vfsuid_t make_vfsuid(struct mnt_idmap *idmap, in make_vfsuid() argument 135 make_vfsgid(struct mnt_idmap *idmap, struct user_namespace *fs_userns, kgid_t kgid) make_vfsgid() argument 164 from_vfsuid(struct mnt_idmap *idmap, struct user_namespace *fs_userns, vfsuid_t vfsuid) from_vfsuid() argument 192 from_vfsgid(struct mnt_idmap *idmap, struct user_namespace *fs_userns, vfsgid_t vfsgid) from_vfsgid() argument 233 struct mnt_idmap *idmap; alloc_mnt_idmap() local 252 mnt_idmap_get(struct mnt_idmap *idmap) mnt_idmap_get() argument 267 mnt_idmap_put(struct mnt_idmap *idmap) mnt_idmap_put() argument [all...] |
H A D | attr.c | 27 * @idmap: idmap of the mount @inode was found from 37 int setattr_should_drop_sgid(struct mnt_idmap *idmap, in setattr_should_drop_sgid() argument 46 if (!in_group_or_capable(idmap, inode, i_gid_into_vfsgid(idmap, inode))) in setattr_should_drop_sgid() 55 * @idmap: idmap of the mount @inode was found from 67 int setattr_should_drop_suidgid(struct mnt_idmap *idmap, in setattr_should_drop_suidgid() argument 77 kill |= setattr_should_drop_sgid(idmap, inode); in setattr_should_drop_suidgid() 88 * @idmap 98 chown_ok(struct mnt_idmap *idmap, const struct inode *inode, vfsuid_t ia_vfsuid) chown_ok() argument 125 chgrp_ok(struct mnt_idmap *idmap, const struct inode *inode, vfsgid_t ia_vfsgid) chgrp_ok() argument 165 setattr_prepare(struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *attr) setattr_prepare() argument 303 setattr_copy(struct mnt_idmap *idmap, struct inode *inode, const struct iattr *attr) setattr_copy() argument 326 may_setattr(struct mnt_idmap *idmap, struct inode *inode, unsigned int ia_valid) may_setattr() argument 381 notify_change(struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *attr, struct inode **delegated_inode) notify_change() argument [all...] |
H A D | posix_acl.c | 115 static struct posix_acl *__get_acl(struct mnt_idmap *idmap, in __get_acl() argument 158 acl = inode->i_op->get_acl(idmap, dentry, type); in __get_acl() 376 posix_acl_permission(struct mnt_idmap *idmap, struct inode *inode, in posix_acl_permission() argument 391 vfsuid = i_uid_into_vfsuid(idmap, inode); in posix_acl_permission() 396 vfsuid = make_vfsuid(idmap, fs_userns, in posix_acl_permission() 402 vfsgid = i_gid_into_vfsgid(idmap, inode); in posix_acl_permission() 410 vfsgid = make_vfsgid(idmap, fs_userns, in posix_acl_permission() 595 * @idmap: idmap of the mount @inode was found from 599 * If the dentry has been found through an idmapped mount the idmap o 606 posix_acl_chmod(struct mnt_idmap *idmap, struct dentry *dentry, umode_t mode) posix_acl_chmod() argument 707 posix_acl_update_mode(struct mnt_idmap *idmap, struct inode *inode, umode_t *mode_p, struct posix_acl **acl) posix_acl_update_mode() argument 888 vfs_posix_acl_to_xattr(struct mnt_idmap *idmap, struct inode *inode, const struct posix_acl *acl, void *buffer, size_t size) vfs_posix_acl_to_xattr() argument 936 set_posix_acl(struct mnt_idmap *idmap, struct dentry *dentry, int type, struct posix_acl *acl) set_posix_acl() argument 1017 simple_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, struct posix_acl *acl, int type) simple_set_acl() argument 1056 vfs_set_acl_idmapped_mnt(struct mnt_idmap *idmap, struct user_namespace *fs_userns, struct posix_acl *acl) vfs_set_acl_idmapped_mnt() argument 1090 vfs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, const char *acl_name, struct posix_acl *kacl) vfs_set_acl() argument 1167 vfs_get_acl(struct mnt_idmap *idmap, struct dentry *dentry, const char *acl_name) vfs_get_acl() argument 1211 vfs_remove_acl(struct mnt_idmap *idmap, struct dentry *dentry, const char *acl_name) vfs_remove_acl() argument 1264 do_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, const char *acl_name, const void *kvalue, size_t size) do_set_acl() argument 1285 do_get_acl(struct mnt_idmap *idmap, struct dentry *dentry, const char *acl_name, void *kvalue, size_t size) do_get_acl() argument [all...] |
H A D | bad_inode.c | 30 static int bad_inode_create(struct mnt_idmap *idmap, in bad_inode_create() argument 54 static int bad_inode_symlink(struct mnt_idmap *idmap, in bad_inode_symlink() argument 61 static int bad_inode_mkdir(struct mnt_idmap *idmap, struct inode *dir, in bad_inode_mkdir() argument 72 static int bad_inode_mknod(struct mnt_idmap *idmap, struct inode *dir, in bad_inode_mknod() argument 78 static int bad_inode_rename2(struct mnt_idmap *idmap, in bad_inode_rename2() argument 92 static int bad_inode_permission(struct mnt_idmap *idmap, in bad_inode_permission() argument 98 static int bad_inode_getattr(struct mnt_idmap *idmap, in bad_inode_getattr() argument 105 static int bad_inode_setattr(struct mnt_idmap *idmap, in bad_inode_setattr() argument 148 static int bad_inode_tmpfile(struct mnt_idmap *idmap, in bad_inode_tmpfile() argument 155 static int bad_inode_set_acl(struct mnt_idmap *idmap, in bad_inode_set_acl() argument [all...] |
H A D | xattr.c | 86 * @idmap: idmap of the mount the inode was found from 98 int may_write_xattr(struct mnt_idmap *idmap, struct inode *inode) in may_write_xattr() argument 104 if (HAS_UNMAPPED_ID(idmap, inode)) in may_write_xattr() 114 xattr_permission(struct mnt_idmap *idmap, struct inode *inode, in xattr_permission() argument 120 ret = may_write_xattr(idmap, inode); in xattr_permission() 152 !inode_owner_or_capable(idmap, inode)) in xattr_permission() 156 return inode_permission(idmap, inode, mask); in xattr_permission() 185 __vfs_setxattr(struct mnt_idmap *idmap, struct dentry *dentry, in __vfs_setxattr() argument 201 return handler->set(handler, idmap, dentr in __vfs_setxattr() 223 __vfs_setxattr_noperm(struct mnt_idmap *idmap, struct dentry *dentry, const char *name, const void *value, size_t size, int flags) __vfs_setxattr_noperm() argument 276 __vfs_setxattr_locked(struct mnt_idmap *idmap, struct dentry *dentry, const char *name, const void *value, size_t size, int flags, struct inode **delegated_inode) __vfs_setxattr_locked() argument 305 vfs_setxattr(struct mnt_idmap *idmap, struct dentry *dentry, const char *name, const void *value, size_t size, int flags) vfs_setxattr() argument 339 xattr_getsecurity(struct mnt_idmap *idmap, struct inode *inode, const char *name, void *value, size_t size) xattr_getsecurity() argument 376 vfs_getxattr_alloc(struct mnt_idmap *idmap, struct dentry *dentry, const char *name, char **xattr_value, size_t xattr_size, gfp_t flags) vfs_getxattr_alloc() argument 429 vfs_getxattr(struct mnt_idmap *idmap, struct dentry *dentry, const char *name, void *value, size_t size) vfs_getxattr() argument 505 __vfs_removexattr(struct mnt_idmap *idmap, struct dentry *dentry, const char *name) __vfs_removexattr() argument 535 __vfs_removexattr_locked(struct mnt_idmap *idmap, struct dentry *dentry, const char *name, struct inode **delegated_inode) __vfs_removexattr_locked() argument 567 vfs_removexattr(struct mnt_idmap *idmap, struct dentry *dentry, const char *name) vfs_removexattr() argument 623 do_setxattr(struct mnt_idmap *idmap, struct dentry *dentry, struct xattr_ctx *ctx) do_setxattr() argument 635 setxattr(struct mnt_idmap *idmap, struct dentry *d, const char __user *name, const void __user *value, size_t size, int flags) setxattr() argument 722 do_getxattr(struct mnt_idmap *idmap, struct dentry *d, struct xattr_ctx *ctx) do_getxattr() argument 753 getxattr(struct mnt_idmap *idmap, struct dentry *d, const char __user *name, void __user *value, size_t size) getxattr() argument 903 removexattr(struct mnt_idmap *idmap, struct dentry *d, const char __user *name) removexattr() argument [all...] |
H A D | internal.h | 58 int may_linkat(struct mnt_idmap *idmap, const struct path *link); 189 bool in_group_or_capable(struct mnt_idmap *idmap, 264 ssize_t do_getxattr(struct mnt_idmap *idmap, 269 int do_setxattr(struct mnt_idmap *idmap, struct dentry *dentry, 271 int may_write_xattr(struct mnt_idmap *idmap, struct inode *inode); 274 int do_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, 276 ssize_t do_get_acl(struct mnt_idmap *idmap, struct dentry *dentry, 279 static inline int do_set_acl(struct mnt_idmap *idmap, in do_set_acl() argument 285 static inline ssize_t do_get_acl(struct mnt_idmap *idmap, in do_get_acl() argument 299 struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap); [all...] |
H A D | namei.c | 280 * @idmap: idmap of the mount the inode was found from 288 * If the inode has been found through an idmapped mount the idmap of 289 * the vfsmount must be passed through @idmap. This function will then take 290 * care to map the inode according to @idmap before checking permissions. 294 static int check_acl(struct mnt_idmap *idmap, in check_acl() argument 307 return posix_acl_permission(idmap, inode, acl, mask); in check_acl() 314 int error = posix_acl_permission(idmap, inode, acl, mask); in check_acl() 325 * @idmap: idmap o 339 acl_permission_check(struct mnt_idmap *idmap, struct inode *inode, int mask) acl_permission_check() argument 400 generic_permission(struct mnt_idmap *idmap, struct inode *inode, int mask) generic_permission() argument 457 do_inode_permission(struct mnt_idmap *idmap, struct inode *inode, int mask) do_inode_permission() argument 504 inode_permission(struct mnt_idmap *idmap, struct inode *inode, int mask) inode_permission() argument 1104 struct mnt_idmap *idmap; may_follow_link() local 1145 safe_hardlink_source(struct mnt_idmap *idmap, struct inode *inode) safe_hardlink_source() argument 1188 may_linkat(struct mnt_idmap *idmap, const struct path *link) may_linkat() argument 1238 may_create_in_sticky(struct mnt_idmap *idmap, struct nameidata *nd, struct inode *const inode) may_create_in_sticky() argument 1716 may_lookup(struct mnt_idmap *idmap, struct nameidata *nd) may_lookup() argument 2265 struct mnt_idmap *idmap; link_path_walk() local 2660 lookup_one_common(struct mnt_idmap *idmap, const char *name, struct dentry *base, int len, struct qstr *this) lookup_one_common() argument 2762 lookup_one(struct mnt_idmap *idmap, const char *name, struct dentry *base, int len) lookup_one() argument 2793 lookup_one_unlocked(struct mnt_idmap *idmap, const char *name, struct dentry *base, int len) lookup_one_unlocked() argument 2832 lookup_one_positive_unlocked(struct mnt_idmap *idmap, const char *name, struct dentry *base, int len) lookup_one_positive_unlocked() argument 2918 __check_sticky(struct mnt_idmap *idmap, struct inode *dir, struct inode *inode) __check_sticky() argument 2951 may_delete(struct mnt_idmap *idmap, struct inode *dir, struct dentry *victim, bool isdir) may_delete() argument 3003 may_create(struct mnt_idmap *idmap, struct inode *dir, struct dentry *child) may_create() argument 3143 vfs_prepare_mode(struct mnt_idmap *idmap, const struct inode *dir, umode_t mode, umode_t mask_perms, umode_t type) vfs_prepare_mode() argument 3176 vfs_create(struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry, umode_t mode, bool want_excl) vfs_create() argument 3226 may_open(struct mnt_idmap *idmap, const struct path *path, int acc_mode, int flag) may_open() argument 3283 handle_truncate(struct mnt_idmap *idmap, struct file *filp) handle_truncate() argument 3308 may_o_create(struct mnt_idmap *idmap, const struct path *dir, struct dentry *dentry, umode_t mode) may_o_create() argument 3399 struct mnt_idmap *idmap; lookup_open() local 3593 struct mnt_idmap *idmap; do_open() local 3663 vfs_tmpfile(struct mnt_idmap *idmap, const struct path *parentpath, struct file *file, umode_t mode) vfs_tmpfile() argument 3715 kernel_tmpfile_open(struct mnt_idmap *idmap, const struct path *parentpath, umode_t mode, int open_flag, const struct cred *cred) kernel_tmpfile_open() argument 3968 vfs_mknod(struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) vfs_mknod() argument 4020 struct mnt_idmap *idmap; do_mknodat() local 4094 vfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry, umode_t mode) vfs_mkdir() argument 4175 vfs_rmdir(struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry) vfs_rmdir() argument 4304 vfs_unlink(struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry, struct inode **delegated_inode) vfs_unlink() argument 4459 vfs_symlink(struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry, const char *oldname) vfs_symlink() argument 4551 vfs_link(struct dentry *old_dentry, struct mnt_idmap *idmap, struct inode *dir, struct dentry *new_dentry, struct inode **delegated_inode) vfs_link() argument 4626 struct mnt_idmap *idmap; do_linkat() local [all...] |
/kernel/linux/linux-6.6/include/linux/ |
H A D | evm.h | 24 extern int evm_inode_setattr(struct mnt_idmap *idmap, 27 extern int evm_inode_setxattr(struct mnt_idmap *idmap, 34 extern int evm_inode_removexattr(struct mnt_idmap *idmap, 38 static inline void evm_inode_post_remove_acl(struct mnt_idmap *idmap, in evm_inode_post_remove_acl() argument 44 extern int evm_inode_set_acl(struct mnt_idmap *idmap, 47 static inline int evm_inode_remove_acl(struct mnt_idmap *idmap, in evm_inode_remove_acl() argument 51 return evm_inode_set_acl(idmap, dentry, acl_name, NULL); in evm_inode_remove_acl() 94 static inline int evm_inode_setattr(struct mnt_idmap *idmap, in evm_inode_setattr() argument 105 static inline int evm_inode_setxattr(struct mnt_idmap *idmap, in evm_inode_setxattr() argument 120 static inline int evm_inode_removexattr(struct mnt_idmap *idmap, in evm_inode_removexattr() argument 133 evm_inode_post_remove_acl(struct mnt_idmap *idmap, struct dentry *dentry, const char *acl_name) evm_inode_post_remove_acl() argument 140 evm_inode_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, const char *acl_name, struct posix_acl *kacl) evm_inode_set_acl() argument 147 evm_inode_remove_acl(struct mnt_idmap *idmap, struct dentry *dentry, const char *acl_name) evm_inode_remove_acl() argument [all...] |
H A D | mnt_idmapping.h | 118 vfsuid_t make_vfsuid(struct mnt_idmap *idmap, 121 vfsgid_t make_vfsgid(struct mnt_idmap *idmap, 124 kuid_t from_vfsuid(struct mnt_idmap *idmap, 127 kgid_t from_vfsgid(struct mnt_idmap *idmap, 132 * @idmap: the mount's idmapping 142 static inline bool vfsuid_has_fsmapping(struct mnt_idmap *idmap, in vfsuid_has_fsmapping() argument 146 return uid_valid(from_vfsuid(idmap, fs_userns, vfsuid)); in vfsuid_has_fsmapping() 170 * @idmap: the mount's idmapping 180 static inline bool vfsgid_has_fsmapping(struct mnt_idmap *idmap, in vfsgid_has_fsmapping() argument 184 return gid_valid(from_vfsgid(idmap, fs_usern in vfsgid_has_fsmapping() 219 mapped_fsuid(struct mnt_idmap *idmap, struct user_namespace *fs_userns) mapped_fsuid() argument 238 mapped_fsgid(struct mnt_idmap *idmap, struct user_namespace *fs_userns) mapped_fsgid() argument [all...] |
H A D | ima.h | 21 extern void ima_post_create_tmpfile(struct mnt_idmap *idmap, 34 extern void ima_post_path_mknod(struct mnt_idmap *idmap, 70 static inline void ima_post_create_tmpfile(struct mnt_idmap *idmap, in ima_post_create_tmpfile() argument 116 static inline void ima_post_path_mknod(struct mnt_idmap *idmap, in ima_post_path_mknod() argument 188 extern void ima_inode_post_setattr(struct mnt_idmap *idmap, 192 extern int ima_inode_set_acl(struct mnt_idmap *idmap, 195 static inline int ima_inode_remove_acl(struct mnt_idmap *idmap, in ima_inode_remove_acl() argument 199 return ima_inode_set_acl(idmap, dentry, acl_name, NULL); in ima_inode_remove_acl() 208 static inline void ima_inode_post_setattr(struct mnt_idmap *idmap, in ima_inode_post_setattr() argument 222 static inline int ima_inode_set_acl(struct mnt_idmap *idmap, in ima_inode_set_acl() argument 236 ima_inode_remove_acl(struct mnt_idmap *idmap, struct dentry *dentry, const char *acl_name) ima_inode_remove_acl() argument [all...] |
H A D | posix_acl.h | 103 int vfs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, 105 struct posix_acl *vfs_get_acl(struct mnt_idmap *idmap, 107 int vfs_remove_acl(struct mnt_idmap *idmap, struct dentry *dentry, 112 static inline int posix_acl_chmod(struct mnt_idmap *idmap, in posix_acl_chmod() argument 139 static inline int vfs_set_acl(struct mnt_idmap *idmap, in vfs_set_acl() argument 146 static inline struct posix_acl *vfs_get_acl(struct mnt_idmap *idmap, in vfs_get_acl() argument 153 static inline int vfs_remove_acl(struct mnt_idmap *idmap, in vfs_remove_acl() argument
|
/kernel/linux/linux-6.6/fs/smb/server/ |
H A D | vfs.h | 75 void ksmbd_vfs_query_maximal_access(struct mnt_idmap *idmap, 103 ssize_t ksmbd_vfs_getxattr(struct mnt_idmap *idmap, 107 ssize_t ksmbd_vfs_casexattr_len(struct mnt_idmap *idmap, 110 int ksmbd_vfs_setxattr(struct mnt_idmap *idmap, 116 int ksmbd_vfs_remove_xattr(struct mnt_idmap *idmap, 137 struct mnt_idmap *idmap, 143 int ksmbd_vfs_remove_acl_xattrs(struct mnt_idmap *idmap, 145 int ksmbd_vfs_remove_sd_xattrs(struct mnt_idmap *idmap, const struct path *path); 147 struct mnt_idmap *idmap, 152 struct mnt_idmap *idmap, [all...] |
H A D | vfs.c | 139 void ksmbd_vfs_query_maximal_access(struct mnt_idmap *idmap, in ksmbd_vfs_query_maximal_access() argument 144 if (!inode_permission(idmap, d_inode(dentry), MAY_OPEN | MAY_WRITE)) in ksmbd_vfs_query_maximal_access() 150 if (!inode_permission(idmap, d_inode(dentry), MAY_OPEN | MAY_READ)) in ksmbd_vfs_query_maximal_access() 153 if (!inode_permission(idmap, d_inode(dentry), MAY_OPEN | MAY_EXEC)) in ksmbd_vfs_query_maximal_access() 156 if (!inode_permission(idmap, d_inode(dentry->d_parent), MAY_EXEC | MAY_WRITE)) in ksmbd_vfs_query_maximal_access() 208 struct mnt_idmap *idmap; in ksmbd_vfs_mkdir() local 224 idmap = mnt_idmap(path.mnt); in ksmbd_vfs_mkdir() 226 err = vfs_mkdir(idmap, d_inode(path.dentry), dentry, mode); in ksmbd_vfs_mkdir() 230 d = lookup_one(idmap, dentry->d_name.name, dentry->d_parent, in ksmbd_vfs_mkdir() 253 static ssize_t ksmbd_vfs_getcasexattr(struct mnt_idmap *idmap, in ksmbd_vfs_getcasexattr() argument 417 struct mnt_idmap *idmap = file_mnt_idmap(fp->filp); ksmbd_vfs_stream_write() local 596 struct mnt_idmap *idmap; ksmbd_vfs_remove_file() local 869 ksmbd_vfs_xattr_len(struct mnt_idmap *idmap, struct dentry *dentry, char *xattr_name) ksmbd_vfs_xattr_len() argument 884 ksmbd_vfs_getxattr(struct mnt_idmap *idmap, struct dentry *dentry, char *xattr_name, char **xattr_buf) ksmbd_vfs_getxattr() argument 921 ksmbd_vfs_setxattr(struct mnt_idmap *idmap, const struct path *path, const char *attr_name, void *attr_value, size_t attr_size, int flags, bool get_write) ksmbd_vfs_setxattr() argument 1046 ksmbd_vfs_remove_xattr(struct mnt_idmap *idmap, const struct path *path, char *attr_name) ksmbd_vfs_remove_xattr() argument 1065 struct mnt_idmap *idmap = file_mnt_idmap(filp); ksmbd_vfs_unlink() local 1308 ksmbd_vfs_remove_acl_xattrs(struct mnt_idmap *idmap, const struct path *path) ksmbd_vfs_remove_acl_xattrs() argument 1348 ksmbd_vfs_remove_sd_xattrs(struct mnt_idmap *idmap, const struct path *path) ksmbd_vfs_remove_sd_xattrs() argument 1377 ksmbd_vfs_make_xattr_posix_acl(struct mnt_idmap *idmap, struct inode *inode, int acl_type) ksmbd_vfs_make_xattr_posix_acl() argument 1442 ksmbd_vfs_set_sd_xattr(struct ksmbd_conn *conn, struct mnt_idmap *idmap, const struct path *path, struct smb_ntsd *pntsd, int len, bool get_write) ksmbd_vfs_set_sd_xattr() argument 1518 ksmbd_vfs_get_sd_xattr(struct ksmbd_conn *conn, struct mnt_idmap *idmap, struct dentry *dentry, struct smb_ntsd **pntsd) ksmbd_vfs_get_sd_xattr() argument 1593 ksmbd_vfs_set_dos_attrib_xattr(struct mnt_idmap *idmap, const struct path *path, struct xattr_dos_attrib *da, bool get_write) ksmbd_vfs_set_dos_attrib_xattr() argument 1614 ksmbd_vfs_get_dos_attrib_xattr(struct mnt_idmap *idmap, struct dentry *dentry, struct xattr_dos_attrib *da) ksmbd_vfs_get_dos_attrib_xattr() argument 1667 ksmbd_vfs_fill_dentry_attrs(struct ksmbd_work *work, struct mnt_idmap *idmap, struct dentry *dentry, struct ksmbd_kstat *ksmbd_kstat) ksmbd_vfs_fill_dentry_attrs() argument 1706 ksmbd_vfs_casexattr_len(struct mnt_idmap *idmap, struct dentry *dentry, char *attr_name, int attr_name_len) ksmbd_vfs_casexattr_len() argument 1842 ksmbd_vfs_set_init_posix_acl(struct mnt_idmap *idmap, struct path *path) ksmbd_vfs_set_init_posix_acl() argument 1895 ksmbd_vfs_inherit_posix_acl(struct mnt_idmap *idmap, struct path *path, struct inode *parent_inode) ksmbd_vfs_inherit_posix_acl() argument [all...] |
H A D | smbacl.h | 193 int parse_sec_desc(struct mnt_idmap *idmap, struct smb_ntsd *pntsd, 195 int build_sec_desc(struct mnt_idmap *idmap, struct smb_ntsd *pntsd, 214 static inline uid_t posix_acl_uid_translate(struct mnt_idmap *idmap, in posix_acl_uid_translate() argument 220 vfsuid = make_vfsuid(idmap, &init_user_ns, pace->e_uid); in posix_acl_uid_translate() 226 static inline gid_t posix_acl_gid_translate(struct mnt_idmap *idmap, in posix_acl_gid_translate() argument 232 vfsgid = make_vfsgid(idmap, &init_user_ns, pace->e_gid); in posix_acl_gid_translate()
|
H A D | smbacl.c | 257 static int sid_to_id(struct mnt_idmap *idmap, in sid_to_id() argument 279 uid = from_vfsuid(idmap, &init_user_ns, VFSUIDT_INIT(uid)); in sid_to_id() 290 gid = from_vfsgid(idmap, &init_user_ns, VFSGIDT_INIT(gid)); in sid_to_id() 365 static void parse_dacl(struct mnt_idmap *idmap, in parse_dacl() argument 495 ret = sid_to_id(idmap, &ppace[i]->sid, SIDOWNER, &temp_fattr); in parse_dacl() 581 static void set_posix_acl_entries_dacl(struct mnt_idmap *idmap, in set_posix_acl_entries_dacl() argument 606 uid = posix_acl_uid_translate(idmap, pace); in set_posix_acl_entries_dacl() 613 gid = posix_acl_gid_translate(idmap, pace); in set_posix_acl_entries_dacl() 672 uid = posix_acl_uid_translate(idmap, pace); in set_posix_acl_entries_dacl() 677 gid = posix_acl_gid_translate(idmap, pac in set_posix_acl_entries_dacl() 695 set_ntacl_dacl(struct mnt_idmap *idmap, struct smb_acl *pndacl, struct smb_acl *nt_dacl, unsigned int aces_size, const struct smb_sid *pownersid, const struct smb_sid *pgrpsid, struct smb_fattr *fattr) set_ntacl_dacl() argument 735 set_mode_dacl(struct mnt_idmap *idmap, struct smb_acl *pndacl, struct smb_fattr *fattr) set_mode_dacl() argument 814 parse_sec_desc(struct mnt_idmap *idmap, struct smb_ntsd *pntsd, int acl_len, struct smb_fattr *fattr) parse_sec_desc() argument 895 build_sec_desc(struct mnt_idmap *idmap, struct smb_ntsd *pntsd, struct smb_ntsd *ppntsd, int ppntsd_size, int addition_info, __u32 *secdesclen, struct smb_fattr *fattr) build_sec_desc() argument 1008 struct mnt_idmap *idmap = mnt_idmap(path->mnt); smb_inherit_dacl() local 1218 struct mnt_idmap *idmap = mnt_idmap(path->mnt); smb_check_perm_dacl() local 1388 struct mnt_idmap *idmap = mnt_idmap(path->mnt); set_info_sec() local [all...] |
/kernel/linux/linux-6.6/fs/xfs/ |
H A D | xfs_iops.c | 165 struct mnt_idmap *idmap, in xfs_generic_create() 199 error = xfs_create(idmap, XFS_I(dir), &name, mode, rdev, in xfs_generic_create() 203 error = xfs_create_tmpfile(idmap, XFS_I(dir), mode, &ip); in xfs_generic_create() 258 struct mnt_idmap *idmap, in xfs_vn_mknod() 264 return xfs_generic_create(idmap, dir, dentry, mode, rdev, NULL); in xfs_vn_mknod() 269 struct mnt_idmap *idmap, in xfs_vn_create() 275 return xfs_generic_create(idmap, dir, dentry, mode, 0, NULL); in xfs_vn_create() 280 struct mnt_idmap *idmap, in xfs_vn_mkdir() 285 return xfs_generic_create(idmap, dir, dentry, mode | S_IFDIR, 0, NULL); in xfs_vn_mkdir() 402 struct mnt_idmap *idmap, in xfs_vn_symlink() 164 xfs_generic_create( struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev, struct file *tmpfile) xfs_generic_create() argument 257 xfs_vn_mknod( struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) xfs_vn_mknod() argument 268 xfs_vn_create( struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry, umode_t mode, bool flags) xfs_vn_create() argument 279 xfs_vn_mkdir( struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry, umode_t mode) xfs_vn_mkdir() argument 401 xfs_vn_symlink( struct mnt_idmap *idmap, struct inode *dir, struct dentry *dentry, const char *symname) xfs_vn_symlink() argument 444 xfs_vn_rename( struct mnt_idmap *idmap, struct inode *odir, struct dentry *odentry, struct inode *ndir, struct dentry *ndentry, unsigned int flags) xfs_vn_rename() argument 550 xfs_vn_getattr( struct mnt_idmap *idmap, const struct path *path, struct kstat *stat, u32 request_mask, unsigned int query_flags) xfs_vn_getattr() argument 633 xfs_vn_change_ok( struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *iattr) xfs_vn_change_ok() argument 656 xfs_setattr_nonsize( struct mnt_idmap *idmap, struct dentry *dentry, struct xfs_inode *ip, struct iattr *iattr) xfs_setattr_nonsize() argument 785 xfs_setattr_size( struct mnt_idmap *idmap, struct dentry *dentry, struct xfs_inode *ip, struct iattr *iattr) xfs_setattr_size() argument 983 xfs_vn_setattr_size( struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *iattr) xfs_vn_setattr_size() argument 1000 xfs_vn_setattr( struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *iattr) xfs_vn_setattr() argument 1103 xfs_vn_tmpfile( struct mnt_idmap *idmap, struct inode *dir, struct file *file, umode_t mode) xfs_vn_tmpfile() argument [all...] |
/kernel/linux/linux-6.6/security/integrity/evm/ |
H A D | evm_main.c | 440 * @idmap: idmap of the mount 450 static int evm_xattr_change(struct mnt_idmap *idmap, in evm_xattr_change() argument 486 static int evm_protect_xattr(struct mnt_idmap *idmap, in evm_protect_xattr() argument 542 !evm_xattr_change(idmap, dentry, xattr_name, xattr_value, in evm_protect_xattr() 557 * @idmap: idmap of the mount 569 int evm_inode_setxattr(struct mnt_idmap *idmap, struct dentry *dentry, in evm_inode_setxattr() argument 588 return evm_protect_xattr(idmap, dentry, xattr_name, xattr_value, in evm_inode_setxattr() 594 * @idmap 601 evm_inode_removexattr(struct mnt_idmap *idmap, struct dentry *dentry, const char *xattr_name) evm_inode_removexattr() argument 614 evm_inode_set_acl_change(struct mnt_idmap *idmap, struct dentry *dentry, const char *name, struct posix_acl *kacl) evm_inode_set_acl_change() argument 633 evm_inode_set_acl_change(struct mnt_idmap *idmap, struct dentry *dentry, const char *name, struct posix_acl *kacl) evm_inode_set_acl_change() argument 653 evm_inode_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, const char *acl_name, struct posix_acl *kacl) evm_inode_set_acl() argument 783 evm_attr_change(struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *attr) evm_attr_change() argument 806 evm_inode_setattr(struct mnt_idmap *idmap, struct dentry *dentry, struct iattr *attr) evm_inode_setattr() argument [all...] |
/kernel/linux/linux-6.6/fs/fat/ |
H A D | file.c | 398 int fat_getattr(struct mnt_idmap *idmap, const struct path *path, in fat_getattr() argument 404 generic_fillattr(idmap, request_mask, inode, stat); in fat_getattr() 459 static int fat_allow_set_time(struct mnt_idmap *idmap, in fat_allow_set_time() argument 464 if (!vfsuid_eq_kuid(i_uid_into_vfsuid(idmap, inode), in fat_allow_set_time() 466 if (vfsgid_in_group_p(i_gid_into_vfsgid(idmap, inode))) in fat_allow_set_time() 480 int fat_setattr(struct mnt_idmap *idmap, struct dentry *dentry, in fat_setattr() argument 491 if (fat_allow_set_time(idmap, sbi, inode)) in fat_setattr() 495 error = setattr_prepare(idmap, dentry, attr); in fat_setattr() 521 (!uid_eq(from_vfsuid(idmap, i_user_ns(inode), attr->ia_vfsuid), in fat_setattr() 524 (!gid_eq(from_vfsgid(idmap, i_user_n in fat_setattr() [all...] |
/kernel/linux/linux-6.6/fs/f2fs/ |
H A D | namei.c | 219 static struct inode *f2fs_new_inode(struct mnt_idmap *idmap, in f2fs_new_inode() argument 242 inode_init_owner(idmap, inode, dir, mode); in f2fs_new_inode() 350 static int f2fs_create(struct mnt_idmap *idmap, struct inode *dir, in f2fs_create() argument 367 inode = f2fs_new_inode(idmap, dir, mode, dentry->d_name.name); in f2fs_create() 676 static int f2fs_symlink(struct mnt_idmap *idmap, struct inode *dir, in f2fs_symlink() argument 699 inode = f2fs_new_inode(idmap, dir, S_IFLNK | S_IRWXUGO, NULL); in f2fs_symlink() 756 static int f2fs_mkdir(struct mnt_idmap *idmap, struct inode *dir, in f2fs_mkdir() argument 770 inode = f2fs_new_inode(idmap, dir, S_IFDIR | mode, NULL); in f2fs_mkdir() 811 static int f2fs_mknod(struct mnt_idmap *idmap, struct inode *dir, in f2fs_mknod() argument 827 inode = f2fs_new_inode(idmap, di in f2fs_mknod() 854 __f2fs_tmpfile(struct mnt_idmap *idmap, struct inode *dir, struct file *file, umode_t mode, bool is_whiteout, struct inode **new_inode, struct f2fs_filename *fname) __f2fs_tmpfile() argument 924 f2fs_tmpfile(struct mnt_idmap *idmap, struct inode *dir, struct file *file, umode_t mode) f2fs_tmpfile() argument 940 f2fs_create_whiteout(struct mnt_idmap *idmap, struct inode *dir, struct inode **whiteout, struct f2fs_filename *fname) f2fs_create_whiteout() argument 948 f2fs_get_tmpfile(struct mnt_idmap *idmap, struct inode *dir, struct inode **new_inode) f2fs_get_tmpfile() argument 955 f2fs_rename(struct mnt_idmap *idmap, struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry, unsigned int flags) f2fs_rename() argument 1318 f2fs_rename2(struct mnt_idmap *idmap, struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry, unsigned int flags) f2fs_rename2() argument 1365 f2fs_encrypted_symlink_getattr(struct mnt_idmap *idmap, const struct path *path, struct kstat *stat, u32 request_mask, unsigned int query_flags) f2fs_encrypted_symlink_getattr() argument [all...] |
/kernel/linux/linux-6.6/fs/fuse/ |
H A D | acl.c | 15 struct mnt_idmap *idmap, in __fuse_get_acl() 68 struct posix_acl *fuse_get_acl(struct mnt_idmap *idmap, in fuse_get_acl() argument 77 return __fuse_get_acl(fc, idmap, inode, type, false); in fuse_get_acl() 97 int fuse_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, in fuse_set_acl() argument 14 __fuse_get_acl(struct fuse_conn *fc, struct mnt_idmap *idmap, struct inode *inode, int type, bool rcu) __fuse_get_acl() argument
|
/kernel/linux/linux-6.6/fs/ocfs2/ |
H A D | file.h | 52 int ocfs2_setattr(struct mnt_idmap *idmap, struct dentry *dentry, 54 int ocfs2_getattr(struct mnt_idmap *idmap, const struct path *path, 56 int ocfs2_permission(struct mnt_idmap *idmap,
|
/kernel/linux/linux-6.6/fs/ntfs3/ |
H A D | namei.c | 107 static int ntfs_create(struct mnt_idmap *idmap, struct inode *dir, in ntfs_create() argument 112 inode = ntfs_create_inode(idmap, dir, dentry, NULL, S_IFREG | mode, 0, in ntfs_create() 123 static int ntfs_mknod(struct mnt_idmap *idmap, struct inode *dir, in ntfs_mknod() argument 128 inode = ntfs_create_inode(idmap, dir, dentry, NULL, mode, rdev, NULL, 0, in ntfs_mknod() 199 static int ntfs_symlink(struct mnt_idmap *idmap, struct inode *dir, in ntfs_symlink() argument 208 inode = ntfs_create_inode(idmap, dir, dentry, NULL, S_IFLNK | 0777, 0, in ntfs_symlink() 217 static int ntfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, in ntfs_mkdir() argument 222 inode = ntfs_create_inode(idmap, dir, dentry, NULL, S_IFDIR | mode, 0, in ntfs_mkdir() 251 static int ntfs_rename(struct mnt_idmap *idmap, struct inode *dir, in ntfs_rename() argument
|
/kernel/linux/linux-6.6/fs/sysv/ |
H A D | namei.c | 44 static int sysv_mknod(struct mnt_idmap *idmap, struct inode *dir, in sysv_mknod() argument 64 static int sysv_create(struct mnt_idmap *idmap, struct inode *dir, in sysv_create() argument 70 static int sysv_symlink(struct mnt_idmap *idmap, struct inode *dir, in sysv_symlink() argument 113 static int sysv_mkdir(struct mnt_idmap *idmap, struct inode *dir, in sysv_mkdir() argument 191 static int sysv_rename(struct mnt_idmap *idmap, struct inode *old_dir, in sysv_rename() argument
|