| /linux/fs/nfs/ |
| H A D | nfs4idmap.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 *idmap) in nfs_idmap_request_key() argument 290 if (!idmap->user_ns || idmap->user_ns == &init_user_ns) in nfs_idmap_request_key() 293 mutex_lock(&idmap->idmap_mutex); in nfs_idmap_request_key() 295 desc, NULL, "", 0, idmap); in nfs_idmap_request_key() 296 mutex_unlock(&idmap->idmap_mutex); in nfs_idmap_request_key() [all …]
|
| /linux/Documentation/admin-guide/nfs/ |
| H 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/fs/xfs/ |
| H A D | xfs_iops.c | 172 struct mnt_idmap *idmap, in xfs_generic_create() argument 180 .idmap = idmap, in xfs_generic_create() 282 struct mnt_idmap *idmap, in xfs_vn_mknod() argument 288 return xfs_generic_create(idmap, dir, dentry, mode, rdev, NULL); in xfs_vn_mknod() 293 struct mnt_idmap *idmap, in xfs_vn_create() argument 299 return xfs_generic_create(idmap, dir, dentry, mode, 0, NULL); in xfs_vn_create() 304 struct mnt_idmap *idmap, in xfs_vn_mkdir() argument 309 return ERR_PTR(xfs_generic_create(idmap, dir, dentry, mode | S_IFDIR, 0, NULL)); in xfs_vn_mkdir() 429 struct mnt_idmap *idmap, in xfs_vn_symlink() argument 444 error = xfs_symlink(idmap, XFS_I(dir), &name, symname, mode, &cip); in xfs_vn_symlink() [all …]
|
| H A D | xfs_itable.c | 66 struct mnt_idmap *idmap, in xfs_bulkstat_one_int() argument 102 vfsuid = i_uid_into_vfsuid(idmap, inode); in xfs_bulkstat_one_int() 103 vfsgid = i_gid_into_vfsgid(idmap, inode); in xfs_bulkstat_one_int() 225 if (breq->idmap != &nop_mnt_idmap) { in xfs_bulkstat_one() 243 error = xfs_bulkstat_one_int(breq->mp, breq->idmap, tp, in xfs_bulkstat_one() 268 error = xfs_bulkstat_one_int(mp, bc->breq->idmap, tp, ino, data); in xfs_bulkstat_iwalk() 312 if (breq->idmap != &nop_mnt_idmap) { in xfs_bulkstat()
|
| /linux/fs/ |
| H A D | internal.h | 59 int may_linkat(struct mnt_idmap *idmap, const struct path *link); 66 int vfs_tmpfile(struct mnt_idmap *idmap, 211 bool in_group_or_capable(struct mnt_idmap *idmap, 297 int may_write_xattr(struct mnt_idmap *idmap, struct inode *inode); 300 int do_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, 302 ssize_t do_get_acl(struct mnt_idmap *idmap, struct dentry *dentry, 305 static inline int do_set_acl(struct mnt_idmap *idmap, in do_set_acl() argument 311 static inline ssize_t do_get_acl(struct mnt_idmap *idmap, in do_get_acl() argument 325 struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap); 326 void mnt_idmap_put(struct mnt_idmap *idmap); [all …]
|
| /linux/security/integrity/evm/ |
| H A D | evm_main.c | 461 static int evm_xattr_change(struct mnt_idmap *idmap, in evm_xattr_change() argument 497 static int evm_protect_xattr(struct mnt_idmap *idmap, in evm_protect_xattr() argument 559 !evm_xattr_change(idmap, dentry, xattr_name, xattr_value, in evm_protect_xattr() 587 static int evm_inode_setxattr(struct mnt_idmap *idmap, struct dentry *dentry, in evm_inode_setxattr() argument 606 return evm_protect_xattr(idmap, dentry, xattr_name, xattr_value, in evm_inode_setxattr() 619 static int evm_inode_removexattr(struct mnt_idmap *idmap, struct dentry *dentry, in evm_inode_removexattr() argument 628 return evm_protect_xattr(idmap, dentry, xattr_name, NULL, 0); in evm_inode_removexattr() 632 static int evm_inode_set_acl_change(struct mnt_idmap *idmap, in evm_inode_set_acl_change() argument 644 rc = posix_acl_update_mode(idmap, inode, &mode, &kacl); 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() argument [all …]
|
| /linux/fs/smb/server/ |
| 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() argument 111 vfsuid = make_vfsuid(idmap, &init_user_ns, pace->e_uid); in posix_acl_uid_translate() 117 static inline gid_t posix_acl_gid_translate(struct mnt_idmap *idmap, in posix_acl_gid_translate() argument 123 vfsgid = make_vfsgid(idmap, &init_user_ns, pace->e_gid); in posix_acl_gid_translate()
|
| /linux/fs/fuse/ |
| H A D | dir.c | 743 static int get_create_supp_group(struct mnt_idmap *idmap, in get_create_supp_group() argument 751 vfsgid_t vfsgid = make_vfsgid(idmap, fc->user_ns, kgid); in get_create_supp_group() 774 static int get_create_ext(struct mnt_idmap *idmap, in get_create_ext() argument 786 err = get_create_supp_group(idmap, dir, &ext); in get_create_ext() 812 static int fuse_create_open(struct mnt_idmap *idmap, struct inode *dir, in fuse_create_open() argument 872 err = get_create_ext(idmap, &args, dir, entry, mode); in fuse_create_open() 876 err = fuse_simple_idmap_request(idmap, fm, &args); in fuse_create_open() 934 struct mnt_idmap *idmap = file_mnt_idmap(file); in fuse_atomic_open() local 955 err = fuse_create_open(idmap, dir, entry, file, flags, mode, FUSE_CREATE); in fuse_atomic_open() 964 err = fuse_mknod(idmap, dir, entry, mode, 0); in fuse_atomic_open() [all …]
|
| H A D | acl.c | 67 struct posix_acl *fuse_get_acl(struct mnt_idmap *idmap, in fuse_get_acl() argument 95 int fuse_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, in fuse_set_acl() argument 147 !in_group_or_capable(idmap, inode, in fuse_set_acl() 148 i_gid_into_vfsgid(idmap, inode))) in fuse_set_acl()
|
| /linux/fs/f2fs/ |
| H A D | namei.c | 219 static struct inode *f2fs_new_inode(struct mnt_idmap *idmap, in f2fs_new_inode() argument 243 inode_init_owner(idmap, inode, dir, mode); in f2fs_new_inode() 353 static int f2fs_create(struct mnt_idmap *idmap, struct inode *dir, in f2fs_create() argument 370 inode = f2fs_new_inode(idmap, dir, mode, dentry->d_name.name); in f2fs_create() 631 static int f2fs_symlink(struct mnt_idmap *idmap, struct inode *dir, in f2fs_symlink() argument 654 inode = f2fs_new_inode(idmap, dir, S_IFLNK | S_IRWXUGO, NULL); in f2fs_symlink() 711 static struct dentry *f2fs_mkdir(struct mnt_idmap *idmap, struct inode *dir, in f2fs_mkdir() argument 725 inode = f2fs_new_inode(idmap, dir, S_IFDIR | mode, NULL); in f2fs_mkdir() 766 static int f2fs_mknod(struct mnt_idmap *idmap, struct inode *dir, in f2fs_mknod() argument 782 inode = f2fs_new_inode(idmap, dir, mode, NULL); in f2fs_mknod() [all …]
|
| H A D | acl.c | 208 static int f2fs_acl_update_mode(struct mnt_idmap *idmap, in f2fs_acl_update_mode() argument 223 if (!in_group_or_capable(idmap, inode, i_gid_into_vfsgid(idmap, inode))) in f2fs_acl_update_mode() 229 static int __f2fs_set_acl(struct mnt_idmap *idmap, in __f2fs_set_acl() argument 243 error = f2fs_acl_update_mode(idmap, inode, &mode, &acl); in __f2fs_set_acl() 278 int f2fs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, in f2fs_set_acl() argument 286 return __f2fs_set_acl(idmap, inode, type, acl, NULL); in f2fs_set_acl()
|
| /linux/fs/efivarfs/ |
| H A D | inode.c | 77 static int efivarfs_create(struct mnt_idmap *idmap, struct inode *dir, in efivarfs_create() argument 153 efivarfs_fileattr_set(struct mnt_idmap *idmap, in efivarfs_fileattr_set() argument 173 static int efivarfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, in efivarfs_setattr() argument 179 error = setattr_prepare(idmap, dentry, iattr); in efivarfs_setattr() 183 setattr_copy(idmap, inode, iattr); in efivarfs_setattr()
|
| /linux/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_ns(inode), attr->ia_vfsgid), in fat_setattr() [all …]
|
| /linux/include/linux/ |
| H A D | security.h | 187 int cap_inode_removexattr(struct mnt_idmap *idmap, 190 int cap_inode_killpriv(struct mnt_idmap *idmap, struct dentry *dentry); 191 int cap_inode_getsecurity(struct mnt_idmap *idmap, 407 void security_inode_post_create_tmpfile(struct mnt_idmap *idmap, 424 int security_inode_setattr(struct mnt_idmap *idmap, 426 void security_inode_post_setattr(struct mnt_idmap *idmap, struct dentry *dentry, 429 int security_inode_setxattr(struct mnt_idmap *idmap, 432 int security_inode_set_acl(struct mnt_idmap *idmap, 437 int security_inode_get_acl(struct mnt_idmap *idmap, 439 int security_inode_remove_acl(struct mnt_idmap *idmap, [all …]
|
| H A D | lsm_hook_defs.h | 97 LSM_HOOK(void, LSM_RET_VOID, path_post_mknod, struct mnt_idmap *idmap, 125 LSM_HOOK(void, LSM_RET_VOID, inode_post_create_tmpfile, struct mnt_idmap *idmap, 143 LSM_HOOK(int, 0, inode_setattr, struct mnt_idmap *idmap, struct dentry *dentry, 145 LSM_HOOK(void, LSM_RET_VOID, inode_post_setattr, struct mnt_idmap *idmap, 149 LSM_HOOK(int, 0, inode_setxattr, struct mnt_idmap *idmap, 156 LSM_HOOK(int, 0, inode_removexattr, struct mnt_idmap *idmap, 162 LSM_HOOK(int, 0, inode_set_acl, struct mnt_idmap *idmap, 166 LSM_HOOK(int, 0, inode_get_acl, struct mnt_idmap *idmap, 168 LSM_HOOK(int, 0, inode_remove_acl, struct mnt_idmap *idmap, 170 LSM_HOOK(void, LSM_RET_VOID, inode_post_remove_acl, struct mnt_idmap *idmap, [all …]
|
| /linux/fs/minix/ |
| H 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 struct dentry *minix_mkdir(struct mnt_idmap *idmap, struct inode *dir, in minix_mkdir() argument 190 static int minix_rename(struct mnt_idmap *idmap, in minix_rename() argument
|
| /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() argument 121 static struct dentry *ramfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, in ramfs_mkdir() argument 130 static int ramfs_create(struct mnt_idmap *idmap, struct inode *dir, in ramfs_create() argument 136 static int ramfs_symlink(struct mnt_idmap *idmap, struct inode *dir, in ramfs_symlink() argument 166 static int ramfs_tmpfile(struct mnt_idmap *idmap, in ramfs_tmpfile() argument
|
| /linux/fs/exfat/ |
| H A D | file.c | 92 static bool exfat_allow_set_time(struct mnt_idmap *idmap, in exfat_allow_set_time() argument 97 if (!vfsuid_eq_kuid(i_uid_into_vfsuid(idmap, inode), in exfat_allow_set_time() 99 if (vfsgid_in_group_p(i_gid_into_vfsgid(idmap, inode))) in exfat_allow_set_time() 268 int exfat_getattr(struct mnt_idmap *idmap, const struct path *path, in exfat_getattr() argument 275 generic_fillattr(idmap, request_mask, inode, stat); in exfat_getattr() 284 int exfat_setattr(struct mnt_idmap *idmap, struct dentry *dentry, in exfat_setattr() argument 306 exfat_allow_set_time(idmap, sbi, inode)) { in exfat_setattr() 311 error = setattr_prepare(idmap, dentry, attr); in exfat_setattr() 317 (!uid_eq(from_vfsuid(idmap, i_user_ns(inode), attr->ia_vfsuid), in exfat_setattr() 320 (!gid_eq(from_vfsgid(idmap, i_user_ns(inode), attr->ia_vfsgid), in exfat_setattr() [all …]
|
| /linux/security/integrity/ima/ |
| H A D | ima_appraise.c | 74 int ima_must_appraise(struct mnt_idmap *idmap, struct inode *inode, in ima_must_appraise() argument 83 return ima_match_policy(idmap, inode, current_cred(), &prop, in ima_must_appraise() 661 static void ima_inode_post_setattr(struct mnt_idmap *idmap, in ima_inode_post_setattr() argument 672 action = ima_must_appraise(idmap, inode, MAY_ACCESS, POST_SETATTR); in ima_inode_post_setattr() 784 static int ima_inode_setxattr(struct mnt_idmap *idmap, struct dentry *dentry, in ima_inode_setxattr() argument 817 static int ima_inode_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, in ima_inode_set_acl() argument 826 static int ima_inode_removexattr(struct mnt_idmap *idmap, struct dentry *dentry, in ima_inode_removexattr() argument 842 static int ima_inode_remove_acl(struct mnt_idmap *idmap, struct dentry *dentry, in ima_inode_remove_acl() argument 845 return ima_inode_set_acl(idmap, dentry, acl_name, NULL); in ima_inode_remove_acl()
|
| /linux/fs/overlayfs/ |
| H A D | inode.c | 21 int ovl_setattr(struct mnt_idmap *idmap, struct dentry *dentry, in ovl_setattr() argument 163 int ovl_getattr(struct mnt_idmap *idmap, const struct path *path, in ovl_getattr() argument 290 int ovl_permission(struct mnt_idmap *idmap, in ovl_permission() argument 342 struct mnt_idmap *idmap, in ovl_idmap_posix_acl() argument 354 vfsuid = make_vfsuid(idmap, fs_userns, e->e_uid); in ovl_idmap_posix_acl() 358 vfsgid = make_vfsgid(idmap, fs_userns, e->e_gid); in ovl_idmap_posix_acl() 393 struct mnt_idmap *idmap; in ovl_get_acl_path() local 396 idmap = mnt_idmap(path->mnt); in ovl_get_acl_path() 401 real_acl = vfs_get_acl(idmap, path->dentry, acl_name); in ovl_get_acl_path() 419 ovl_idmap_posix_acl(realinode, idmap, clone); in ovl_get_acl_path() [all …]
|
| /linux/security/ |
| H A D | commoncap.c | 351 int cap_inode_killpriv(struct mnt_idmap *idmap, struct dentry *dentry) in cap_inode_killpriv() argument 355 error = __vfs_removexattr(idmap, dentry, XATTR_NAME_CAPS); in cap_inode_killpriv() 420 int cap_inode_getsecurity(struct mnt_idmap *idmap, in cap_inode_getsecurity() argument 441 size = vfs_getxattr_alloc(idmap, dentry, XATTR_NAME_CAPS, &tmpbuf, in cap_inode_getsecurity() 463 vfsroot = make_vfsuid(idmap, fs_ns, kroot); in cap_inode_getsecurity() 569 int cap_convert_nscap(struct mnt_idmap *idmap, struct dentry *dentry, in cap_convert_nscap() argument 587 if (!capable_wrt_inode_uidgid(idmap, inode, CAP_SETFCAP)) in cap_convert_nscap() 589 if (size == XATTR_CAPS_SZ_2 && (idmap == &nop_mnt_idmap)) in cap_convert_nscap() 598 rootid = from_vfsuid(idmap, fs_ns, vfsrootid); in cap_convert_nscap() 675 int get_vfs_caps_from_disk(struct mnt_idmap *idmap, in get_vfs_caps_from_disk() argument [all …]
|
| H A D | security.c | 1402 void security_path_post_mknod(struct mnt_idmap *idmap, struct dentry *dentry) in security_path_post_mknod() argument 1406 call_void_hook(path_post_mknod, idmap, dentry); in security_path_post_mknod() 1615 void security_inode_post_create_tmpfile(struct mnt_idmap *idmap, in security_inode_post_create_tmpfile() argument 1620 call_void_hook(inode_post_create_tmpfile, idmap, inode); in security_inode_post_create_tmpfile() 1832 int security_inode_setattr(struct mnt_idmap *idmap, in security_inode_setattr() argument 1837 return call_int_hook(inode_setattr, idmap, dentry, attr); in security_inode_setattr() 1849 void security_inode_post_setattr(struct mnt_idmap *idmap, struct dentry *dentry, in security_inode_post_setattr() argument 1854 call_void_hook(inode_post_setattr, idmap, dentry, ia_valid); in security_inode_post_setattr() 1898 int security_inode_setxattr(struct mnt_idmap *idmap, in security_inode_setxattr() argument 1914 return call_int_hook(inode_setxattr, idmap, dentry, name, value, size, in security_inode_setxattr() [all …]
|
| /linux/fs/kernfs/ |
| H A D | kernfs-internal.h | 173 int kernfs_iop_permission(struct mnt_idmap *idmap, 175 int kernfs_iop_setattr(struct mnt_idmap *idmap, struct dentry *dentry, 177 int kernfs_iop_getattr(struct mnt_idmap *idmap,
|
| /linux/fs/ceph/ |
| H A D | acl.c | 90 int ceph_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, in ceph_set_acl() argument 110 ret = posix_acl_update_mode(idmap, inode, in ceph_set_acl() 145 ret = __ceph_setattr(idmap, inode, &newattrs, NULL); in ceph_set_acl() 156 __ceph_setattr(idmap, inode, &newattrs, NULL); in ceph_set_acl()
|