/linux-6.3-rc2/fs/nfs/ |
A D | nfs4idmap.c | 65 struct idmap *idmap; member 78 if (idmap && idmap->user_ns) in idmap_userns() 426 struct idmap *idmap = pdo->pdo_data; in nfs_idmap_pipe_destroy() local 438 struct idmap *idmap = pdo->pdo_data; in nfs_idmap_pipe_create() local 457 struct idmap *idmap; in nfs_idmap_new() local 498 struct idmap *idmap = clp->cl_idmap; in nfs_idmap_delete() local 586 struct idmap *idmap = aux; in nfs_idmap_legacy_upcall() local 601 data->idmap = idmap; in nfs_idmap_legacy_upcall() 669 struct idmap *idmap = (struct idmap *)rpci->private; in idmap_pipe_downcall() local 727 struct idmap *idmap = data->idmap; in idmap_pipe_destroy_msg() local [all …]
|
/linux-6.3-rc2/fs/ |
A D | mnt_idmapping.c | 38 return idmap->owner != sb->s_user_ns; in check_fsmapping() 233 struct mnt_idmap *idmap; in alloc_mnt_idmap() local 236 if (!idmap) in alloc_mnt_idmap() 240 refcount_set(&idmap->count, 1); in alloc_mnt_idmap() 241 return idmap; in alloc_mnt_idmap() 254 if (idmap != &nop_mnt_idmap) in mnt_idmap_get() 255 refcount_inc(&idmap->count); in mnt_idmap_get() 257 return idmap; in mnt_idmap_get() 269 if (idmap != &nop_mnt_idmap && refcount_dec_and_test(&idmap->count)) { in mnt_idmap_put() 270 put_user_ns(idmap->owner); in mnt_idmap_put() [all …]
|
A D | attr.c | 46 if (!in_group_or_capable(idmap, inode, i_gid_into_vfsgid(idmap, inode))) in setattr_should_drop_sgid() 97 static bool chown_ok(struct mnt_idmap *idmap, in chown_ok() argument 124 static bool chgrp_ok(struct mnt_idmap *idmap, in chgrp_ok() argument 198 if (!inode_owner_or_capable(idmap, inode)) in setattr_prepare() 204 vfsgid = i_gid_into_vfsgid(idmap, inode); in setattr_prepare() 213 if (!inode_owner_or_capable(idmap, inode)) in setattr_prepare() 307 i_uid_update(idmap, attr, inode); in setattr_copy() 308 i_gid_update(idmap, attr, inode); in setattr_copy() 317 if (!in_group_or_capable(idmap, inode, in setattr_copy() 318 i_gid_into_vfsgid(idmap, inode))) in setattr_copy() [all …]
|
A D | posix_acl.c | 158 acl = inode->i_op->get_acl(idmap, dentry, type); in __get_acl() 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() 948 if (!inode_owner_or_capable(idmap, inode)) in set_posix_acl() 987 error = posix_acl_update_mode(idmap, inode, in simple_set_acl() 1028 acl_e->e_uid = from_vfsuid(idmap, fs_userns, in vfs_set_acl_idmapped_mnt() 1085 error = may_write_xattr(idmap, inode); in vfs_set_acl() 1195 error = may_write_xattr(idmap, inode); in vfs_remove_acl() [all …]
|
A D | xattr.c | 104 if (HAS_UNMAPPED_ID(idmap, inode)) in may_write_xattr() 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() 225 int __vfs_setxattr_noperm(struct mnt_idmap *idmap, in __vfs_setxattr_noperm() argument 533 error = __vfs_removexattr(idmap, dentry, name); in __vfs_removexattr_locked() 555 error = __vfs_removexattr_locked(idmap, dentry, in vfs_removexattr() 632 error = do_setxattr(idmap, d, &ctx); in setxattr() 751 error = do_getxattr(idmap, d, &ctx); in getxattr() 895 return vfs_remove_acl(idmap, d, kname); in removexattr() [all …]
|
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 149 static int bad_inode_tmpfile(struct mnt_idmap *idmap, in bad_inode_tmpfile() argument 156 static int bad_inode_set_acl(struct mnt_idmap *idmap, in bad_inode_set_acl() argument
|
A D | internal.h | 66 int may_linkat(struct mnt_idmap *idmap, const struct path *link); 155 bool in_group_or_capable(struct mnt_idmap *idmap, 228 ssize_t do_getxattr(struct mnt_idmap *idmap, 233 int do_setxattr(struct mnt_idmap *idmap, struct dentry *dentry, 235 int may_write_xattr(struct mnt_idmap *idmap, struct inode *inode); 238 int do_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, 243 static inline int do_set_acl(struct mnt_idmap *idmap, in do_set_acl() argument 249 static inline ssize_t do_get_acl(struct mnt_idmap *idmap, in do_get_acl() argument 262 int setattr_should_drop_sgid(struct mnt_idmap *idmap, 265 struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap); [all …]
|
A D | namei.c | 1098 struct mnt_idmap *idmap; in may_follow_link() local 1104 idmap = mnt_idmap(nd->path.mnt); in may_follow_link() 2257 struct mnt_idmap *idmap; in link_path_walk() local 2263 err = may_lookup(idmap, nd); in link_path_walk() 3325 struct mnt_idmap *idmap; in lookup_open() local 3373 idmap = mnt_idmap(nd->path.mnt); in lookup_open() 3519 struct mnt_idmap *idmap; in do_open() local 3532 idmap = mnt_idmap(nd->path.mnt); in do_open() 3943 struct mnt_idmap *idmap; in do_mknodat() local 3963 idmap = mnt_idmap(path.mnt); in do_mknodat() [all …]
|
/linux-6.3-rc2/fs/ksmbd/ |
A D | vfs.h | 77 int ksmbd_vfs_query_maximal_access(struct mnt_idmap *idmap, 105 ssize_t ksmbd_vfs_getxattr(struct mnt_idmap *idmap, 109 ssize_t ksmbd_vfs_casexattr_len(struct mnt_idmap *idmap, 112 int ksmbd_vfs_setxattr(struct mnt_idmap *idmap, 117 int ksmbd_vfs_remove_xattr(struct mnt_idmap *idmap, 138 struct mnt_idmap *idmap, 144 int ksmbd_vfs_remove_acl_xattrs(struct mnt_idmap *idmap, 146 int ksmbd_vfs_remove_sd_xattrs(struct mnt_idmap *idmap, 149 struct mnt_idmap *idmap, 153 struct mnt_idmap *idmap, [all …]
|
A D | vfs.c | 203 struct mnt_idmap *idmap; in ksmbd_vfs_mkdir() local 219 idmap = mnt_idmap(path.mnt); in ksmbd_vfs_mkdir() 452 err = ksmbd_vfs_setxattr(idmap, in ksmbd_vfs_stream_write() 587 struct mnt_idmap *idmap; in ksmbd_vfs_remove_file() local 602 idmap = mnt_idmap(path.mnt); in ksmbd_vfs_remove_file() 776 struct mnt_idmap *idmap; in ksmbd_vfs_fp_rename() local 820 idmap, in ksmbd_vfs_fp_rename() 968 err = vfs_setxattr(idmap, in ksmbd_vfs_setxattr() 1432 struct mnt_idmap *idmap, in ksmbd_vfs_set_sd_xattr() argument 1506 struct mnt_idmap *idmap, in ksmbd_vfs_get_sd_xattr() argument [all …]
|
A D | smbacl.c | 257 static int sid_to_id(struct mnt_idmap *idmap, in sid_to_id() argument 365 static void parse_dacl(struct mnt_idmap *idmap, in parse_dacl() argument 603 uid = posix_acl_uid_translate(idmap, pace); in set_posix_acl_entries_dacl() 610 gid = posix_acl_gid_translate(idmap, pace); in set_posix_acl_entries_dacl() 884 parse_dacl(idmap, dacl_ptr, end_of_acl, in parse_sec_desc() 892 int build_sec_desc(struct mnt_idmap *idmap, in build_sec_desc() argument 953 set_mode_dacl(idmap, dacl_ptr, fattr); in build_sec_desc() 1165 ksmbd_vfs_set_sd_xattr(conn, idmap, in smb_inherit_dacl() 1389 rc = set_posix_acl(idmap, path->dentry, in set_info_sec() 1396 rc = set_posix_acl(idmap, path->dentry, in set_info_sec() [all …]
|
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()
|
/linux-6.3-rc2/include/linux/ |
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, 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() 93 static inline int evm_inode_setattr(struct mnt_idmap *idmap, in evm_inode_setattr() argument 104 static inline int evm_inode_setxattr(struct mnt_idmap *idmap, in evm_inode_setxattr() argument 119 static inline int evm_inode_removexattr(struct mnt_idmap *idmap, in evm_inode_removexattr() argument 139 static inline int evm_inode_set_acl(struct mnt_idmap *idmap, in evm_inode_set_acl() argument [all …]
|
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, 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() 180 static inline bool vfsgid_has_fsmapping(struct mnt_idmap *idmap, in vfsgid_has_fsmapping() argument 184 return gid_valid(from_vfsgid(idmap, fs_userns, vfsgid)); in vfsgid_has_fsmapping() 219 static inline kuid_t mapped_fsuid(struct mnt_idmap *idmap, in mapped_fsuid() argument 238 static inline kgid_t mapped_fsgid(struct mnt_idmap *idmap, in mapped_fsgid() argument [all …]
|
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 [all …]
|
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, 110 static inline int posix_acl_chmod(struct mnt_idmap *idmap, in posix_acl_chmod() argument 137 static inline int vfs_set_acl(struct mnt_idmap *idmap, in vfs_set_acl() argument 144 static inline struct posix_acl *vfs_get_acl(struct mnt_idmap *idmap, in vfs_get_acl() argument 151 static inline int vfs_remove_acl(struct mnt_idmap *idmap, in vfs_remove_acl() argument
|
/linux-6.3-rc2/fs/xfs/ |
A D | xfs_iops.c | 165 struct mnt_idmap *idmap, in xfs_generic_create() argument 258 struct mnt_idmap *idmap, in xfs_vn_mknod() argument 269 struct mnt_idmap *idmap, in xfs_vn_create() argument 280 struct mnt_idmap *idmap, in xfs_vn_mkdir() argument 402 struct mnt_idmap *idmap, in xfs_vn_symlink() argument 445 struct mnt_idmap *idmap, in xfs_vn_rename() argument 551 struct mnt_idmap *idmap, in xfs_vn_getattr() argument 629 struct mnt_idmap *idmap, in xfs_vn_change_ok() argument 652 struct mnt_idmap *idmap, in xfs_setattr_nonsize() argument 781 struct mnt_idmap *idmap, in xfs_setattr_size() argument [all …]
|
/linux-6.3-rc2/Documentation/admin-guide/nfs/ |
A D | nfs-idmapper.rst | 9 or by placing a call to the rpc.idmap daemon. 19 legacy rpc.idmap daemon for the id mapping. This result will be stored 20 in a custom NFS idmap cache. 31 ``create id_resolver * * /usr/sbin/nfs.idmap %k %d 600`` 34 This will direct all id_resolver requests to the program /usr/sbin/nfs.idmap. 36 expire. This parameter is optional for /usr/sbin/nfs.idmap. When the timeout 37 is not specified, nfs.idmap will default to 600 seconds. 53 ``create id_resolver * * /usr/sbin/nfs.idmap %k %d 600`` 59 /usr/sbin/nfs.idmap will handle gid, user, and group lookups. 65 nfs.idmap [all …]
|
/linux-6.3-rc2/security/integrity/evm/ |
A D | evm_main.c | 449 static int evm_xattr_change(struct mnt_idmap *idmap, in evm_xattr_change() argument 485 static int evm_protect_xattr(struct mnt_idmap *idmap, in evm_protect_xattr() argument 541 !evm_xattr_change(idmap, dentry, xattr_name, xattr_value, in evm_protect_xattr() 600 int evm_inode_removexattr(struct mnt_idmap *idmap, in evm_inode_removexattr() argument 609 return evm_protect_xattr(idmap, dentry, xattr_name, NULL, 0); in evm_inode_removexattr() 613 static int evm_inode_set_acl_change(struct mnt_idmap *idmap, in evm_inode_set_acl_change() argument 625 rc = posix_acl_update_mode(idmap, inode, &mode, &kacl); in evm_inode_set_acl_change() 782 static int evm_attr_change(struct mnt_idmap *idmap, in evm_attr_change() argument 788 if (!i_uid_needs_update(idmap, attr, inode) && in evm_attr_change() 789 !i_gid_needs_update(idmap, attr, inode) && in evm_attr_change() [all …]
|
/linux-6.3-rc2/fs/fat/ |
A D | file.c | 398 int fat_getattr(struct mnt_idmap *idmap, const struct path *path, in fat_getattr() argument 404 generic_fillattr(idmap, 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_ns(inode), attr->ia_vfsgid), in fat_setattr() [all …]
|
/linux-6.3-rc2/fs/f2fs/ |
A D | namei.c | 205 static struct inode *f2fs_new_inode(struct mnt_idmap *idmap, in f2fs_new_inode() argument 228 inode_init_owner(idmap, inode, dir, mode); in f2fs_new_inode() 756 inode = f2fs_new_inode(idmap, dir, S_IFDIR | mode, NULL); in f2fs_mkdir() 813 inode = f2fs_new_inode(idmap, dir, mode, NULL); in f2fs_mknod() 852 inode = f2fs_new_inode(idmap, dir, mode, NULL); in __f2fs_tmpfile() 921 err = __f2fs_tmpfile(idmap, dir, file, mode, false, NULL); in f2fs_tmpfile() 926 static int f2fs_create_whiteout(struct mnt_idmap *idmap, in f2fs_create_whiteout() argument 929 return __f2fs_tmpfile(idmap, dir, NULL, in f2fs_create_whiteout() 979 err = f2fs_create_whiteout(idmap, old_dir, &whiteout); in f2fs_rename() 1295 static int f2fs_rename2(struct mnt_idmap *idmap, in f2fs_rename2() argument [all …]
|
/linux-6.3-rc2/fs/fuse/ |
A D | acl.c | 15 struct mnt_idmap *idmap, in __fuse_get_acl() argument 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
|
/linux-6.3-rc2/fs/minix/ |
A D | namei.c | 36 static int minix_mknod(struct mnt_idmap *idmap, struct inode *dir, in minix_mknod() argument 53 static int minix_tmpfile(struct mnt_idmap *idmap, struct inode *dir, in minix_tmpfile() argument 66 static int minix_create(struct mnt_idmap *idmap, struct inode *dir, in minix_create() argument 72 static int minix_symlink(struct mnt_idmap *idmap, struct inode *dir, in minix_symlink() argument 107 static int minix_mkdir(struct mnt_idmap *idmap, struct inode *dir, in minix_mkdir() argument 177 static int minix_rename(struct mnt_idmap *idmap, in minix_rename() argument
|
/linux-6.3-rc2/arch/arm64/include/asm/ |
A D | mmu_context.h | 109 static inline void __cpu_install_idmap(pgd_t *idmap) in __cpu_install_idmap() argument 115 cpu_switch_mm(lm_alias(idmap), &init_mm); in __cpu_install_idmap() 151 static inline void cpu_replace_ttbr1(pgd_t *pgdp, pgd_t *idmap) in cpu_replace_ttbr1() argument 175 __cpu_install_idmap(idmap); in cpu_replace_ttbr1()
|
/linux-6.3-rc2/fs/ocfs2/ |
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,
|