Home
last modified time | relevance | path

Searched refs:idmap (Results 1 – 25 of 246) sorted by relevance

12345678910

/fs/
A Dmnt_idmapping.c284 kfree(idmap); in free_mnt_idmap()
293 if (!idmap) in alloc_mnt_idmap()
301 free_mnt_idmap(idmap); in alloc_mnt_idmap()
302 idmap = ERR_PTR(ret); in alloc_mnt_idmap()
304 return idmap; in alloc_mnt_idmap()
317 if (idmap != &nop_mnt_idmap && idmap != &invalid_mnt_idmap) in mnt_idmap_get()
320 return idmap; in mnt_idmap_get()
333 if (idmap != &nop_mnt_idmap && idmap != &invalid_mnt_idmap && in mnt_idmap_put()
335 free_mnt_idmap(idmap); in mnt_idmap_put()
352 map = &idmap->uid_map; in statmount_mnt_idmap()
[all …]
A Dattr.c42 if (!in_group_or_capable(idmap, inode, i_gid_into_vfsgid(idmap, inode))) in setattr_should_drop_sgid()
73 kill |= setattr_should_drop_sgid(idmap, inode); in setattr_should_drop_suidgid()
94 static bool chown_ok(struct mnt_idmap *idmap, in chown_ok() argument
121 static bool chgrp_ok(struct mnt_idmap *idmap, in chgrp_ok() argument
195 if (!inode_owner_or_capable(idmap, inode)) in setattr_prepare()
201 vfsgid = i_gid_into_vfsgid(idmap, inode); in setattr_prepare()
210 if (!inode_owner_or_capable(idmap, inode)) in setattr_prepare()
345 i_uid_update(idmap, attr, inode); in setattr_copy()
346 i_gid_update(idmap, attr, inode); in setattr_copy()
349 if (!in_group_or_capable(idmap, inode, in setattr_copy()
[all …]
A Dposix_acl.c389 vfsuid = i_uid_into_vfsuid(idmap, inode); in posix_acl_permission()
394 vfsuid = make_vfsuid(idmap, fs_userns, in posix_acl_permission()
400 vfsgid = i_gid_into_vfsgid(idmap, inode); in posix_acl_permission()
408 vfsgid = make_vfsgid(idmap, fs_userns, in posix_acl_permission()
717 if (!in_group_or_capable(idmap, inode, in posix_acl_update_mode()
718 i_gid_into_vfsgid(idmap, inode))) in posix_acl_update_mode()
946 if (!inode_owner_or_capable(idmap, inode)) in set_posix_acl()
1022 error = posix_acl_update_mode(idmap, inode, in simple_set_acl()
1120 error = may_write_xattr(idmap, inode); in vfs_set_acl()
1228 error = may_write_xattr(idmap, inode); in vfs_remove_acl()
[all …]
A Dxattr.c103 if (HAS_UNMAPPED_ID(idmap, inode)) in may_write_xattr()
119 ret = may_write_xattr(idmap, inode); in xattr_permission()
151 !inode_owner_or_capable(idmap, inode)) in xattr_permission()
155 return inode_permission(idmap, inode, mask); in xattr_permission()
222 int __vfs_setxattr_noperm(struct mnt_idmap *idmap, in __vfs_setxattr_noperm() argument
534 __vfs_removexattr_locked(struct mnt_idmap *idmap, in __vfs_removexattr_locked() argument
553 error = __vfs_removexattr(idmap, dentry, name); in __vfs_removexattr_locked()
575 error = __vfs_removexattr_locked(idmap, dentry, in vfs_removexattr()
633 return do_set_acl(idmap, dentry, ctx->kname->name, in do_setxattr()
1022 return vfs_remove_acl(idmap, d, name); in removexattr()
[all …]
A Dbad_inode.c30 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 struct dentry *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
A Dinternal.h59 int may_linkat(struct mnt_idmap *idmap, const struct path *link);
66 int vfs_tmpfile(struct mnt_idmap *idmap,
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() argument
309 static inline ssize_t do_get_acl(struct mnt_idmap *idmap, in do_get_acl() argument
323 struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap);
324 void mnt_idmap_put(struct mnt_idmap *idmap);
[all …]
A Dnamei.c1170 struct mnt_idmap *idmap; in may_follow_link() local
1176 idmap = mnt_idmap(nd->path.mnt); in may_follow_link()
2440 struct mnt_idmap *idmap; in link_path_walk() local
2445 err = may_lookup(idmap, nd); in link_path_walk()
3614 struct mnt_idmap *idmap; in lookup_open() local
3665 idmap = mnt_idmap(nd->path.mnt); in lookup_open()
3846 struct mnt_idmap *idmap; in do_open() local
3859 idmap = mnt_idmap(nd->path.mnt); in do_open()
4262 struct mnt_idmap *idmap; in do_mknodat() local
4282 idmap = mnt_idmap(path.mnt); in do_mknodat()
[all …]
/fs/nfs/
A Dnfs4idmap.c65 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
434 struct idmap *idmap = pdo->pdo_data; in nfs_idmap_pipe_create() local
447 struct idmap *idmap; in nfs_idmap_new() local
488 struct idmap *idmap = clp->cl_idmap; in nfs_idmap_delete() local
576 struct idmap *idmap = aux; in nfs_idmap_legacy_upcall() local
591 data->idmap = idmap; in nfs_idmap_legacy_upcall()
659 struct idmap *idmap = (struct idmap *)rpci->private; in idmap_pipe_downcall() local
717 struct idmap *idmap = data->idmap; in idmap_pipe_destroy_msg() local
[all …]
/fs/smb/server/
A Dvfs.h76 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,
151 struct mnt_idmap *idmap,
156 struct mnt_idmap *idmap,
166 int ksmbd_vfs_set_init_posix_acl(struct mnt_idmap *idmap,
[all …]
A Dvfs.c213 struct mnt_idmap *idmap; in ksmbd_vfs_mkdir() local
229 idmap = mnt_idmap(path.mnt); in ksmbd_vfs_mkdir()
263 value_len = ksmbd_vfs_getxattr(idmap, in ksmbd_vfs_getcasexattr()
430 v_len = ksmbd_vfs_getcasexattr(idmap, in ksmbd_vfs_stream_write()
456 err = ksmbd_vfs_setxattr(idmap, in ksmbd_vfs_stream_write()
597 struct mnt_idmap *idmap; in ksmbd_vfs_remove_file() local
609 idmap = mnt_idmap(path->mnt); in ksmbd_vfs_remove_file()
944 err = vfs_setxattr(idmap, in ksmbd_vfs_setxattr()
1469 struct mnt_idmap *idmap, in ksmbd_vfs_set_sd_xattr() argument
1536 struct mnt_idmap *idmap, in ksmbd_vfs_get_sd_xattr() argument
[all …]
A Dsmbacl.h84 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()
A Dsmbacl.c257 static int sid_to_id(struct mnt_idmap *idmap, in sid_to_id() argument
370 static void parse_dacl(struct mnt_idmap *idmap, in parse_dacl() argument
614 uid = posix_acl_uid_translate(idmap, pace); in set_posix_acl_entries_dacl()
621 gid = posix_acl_gid_translate(idmap, pace); in set_posix_acl_entries_dacl()
911 parse_dacl(idmap, dacl_ptr, end_of_acl, in parse_sec_desc()
919 int build_sec_desc(struct mnt_idmap *idmap, in build_sec_desc() argument
980 set_mode_dacl(idmap, dacl_ptr, fattr); in build_sec_desc()
1445 ksmbd_vfs_remove_acl_xattrs(idmap, path); in set_info_sec()
1448 rc = set_posix_acl(idmap, path->dentry, in set_info_sec()
1455 rc = set_posix_acl(idmap, path->dentry, in set_info_sec()
[all …]
/fs/xfs/
A Dxfs_iops.c172 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
293 struct mnt_idmap *idmap, in xfs_vn_create() argument
304 struct mnt_idmap *idmap, in xfs_vn_mkdir() argument
429 struct mnt_idmap *idmap, in xfs_vn_symlink() argument
472 struct mnt_idmap *idmap, in xfs_vn_rename() argument
685 struct mnt_idmap *idmap, in xfs_vn_getattr() argument
760 struct mnt_idmap *idmap, in xfs_vn_change_ok() argument
783 struct mnt_idmap *idmap, in xfs_setattr_nonsize() argument
[all …]
A Dxfs_itable.c66 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()
/fs/fuse/
A Ddir.c580 static int get_create_ext(struct mnt_idmap *idmap, in get_create_ext() argument
592 err = get_create_supp_group(idmap, dir, &ext); in get_create_ext()
740 struct mnt_idmap *idmap = file_mnt_idmap(file); in fuse_atomic_open() local
776 err = fuse_mknod(idmap, dir, entry, mode, 0); in fuse_atomic_open()
901 return fuse_mknod(idmap, dir, entry, mode, 0); in fuse_create()
1281 fuse_fillattr(idmap, inode, &attr, stat); in fuse_do_statx()
1367 err = fuse_do_statx(idmap, inode, file, stat); in fuse_update_get_attr()
1591 err = generic_permission(idmap, inode, mask); in fuse_permission()
1599 err = generic_permission(idmap, in fuse_permission()
1961 err = setattr_prepare(idmap, dentry, attr); in fuse_do_setattr()
[all …]
A Dacl.c67 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()
/fs/f2fs/
A Dnamei.c219 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()
370 inode = f2fs_new_inode(idmap, dir, mode, dentry->d_name.name); in f2fs_create()
718 inode = f2fs_new_inode(idmap, dir, S_IFDIR | mode, NULL); in f2fs_mkdir()
775 inode = f2fs_new_inode(idmap, dir, mode, NULL); in f2fs_mknod()
814 inode = f2fs_new_inode(idmap, dir, mode, NULL); in __f2fs_tmpfile()
888 static int f2fs_create_whiteout(struct mnt_idmap *idmap, in f2fs_create_whiteout() argument
899 return __f2fs_tmpfile(idmap, dir, NULL, S_IFREG, in f2fs_get_tmpfile()
1264 static int f2fs_rename2(struct mnt_idmap *idmap, in f2fs_rename2() argument
1290 err = f2fs_rename(idmap, old_dir, old_dentry, in f2fs_rename2()
[all …]
A Dacl.c207 static int f2fs_acl_update_mode(struct mnt_idmap *idmap, in f2fs_acl_update_mode() argument
222 if (!in_group_or_capable(idmap, inode, i_gid_into_vfsgid(idmap, inode))) in f2fs_acl_update_mode()
228 static int __f2fs_set_acl(struct mnt_idmap *idmap, in __f2fs_set_acl() argument
242 error = f2fs_acl_update_mode(idmap, inode, &mode, &acl); in __f2fs_set_acl()
277 int f2fs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, in f2fs_set_acl() argument
285 return __f2fs_set_acl(idmap, inode, type, acl, NULL); in f2fs_set_acl()
/fs/fat/
A Dfile.c398 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 …]
/fs/efivarfs/
A Dinode.c77 static int efivarfs_create(struct mnt_idmap *idmap, struct inode *dir, in efivarfs_create() argument
156 efivarfs_fileattr_set(struct mnt_idmap *idmap, in efivarfs_fileattr_set() argument
176 static int efivarfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, in efivarfs_setattr() argument
182 error = setattr_prepare(idmap, dentry, iattr); in efivarfs_setattr()
186 setattr_copy(idmap, inode, iattr); in efivarfs_setattr()
/fs/ntfs3/
A Dnamei.c107 static int ntfs_create(struct mnt_idmap *idmap, struct inode *dir, in ntfs_create() argument
110 return ntfs_create_inode(idmap, dir, dentry, NULL, S_IFREG | mode, 0, in ntfs_create()
117 static int ntfs_mknod(struct mnt_idmap *idmap, struct inode *dir, in ntfs_mknod() argument
120 return ntfs_create_inode(idmap, dir, dentry, NULL, mode, rdev, NULL, 0, in ntfs_mknod()
193 static int ntfs_symlink(struct mnt_idmap *idmap, struct inode *dir, in ntfs_symlink() argument
205 return ntfs_create_inode(idmap, dir, dentry, NULL, S_IFLNK | 0777, 0, in ntfs_symlink()
212 static struct dentry *ntfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, in ntfs_mkdir() argument
215 return ERR_PTR(ntfs_create_inode(idmap, dir, dentry, NULL, S_IFDIR | mode, 0, in ntfs_mkdir()
246 static int ntfs_rename(struct mnt_idmap *idmap, struct inode *dir, in ntfs_rename() argument
/fs/minix/
A Dnamei.c36 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
176 static int minix_rename(struct mnt_idmap *idmap, in minix_rename() argument
/fs/exfat/
A Dfile.c90 static bool exfat_allow_set_time(struct mnt_idmap *idmap, in exfat_allow_set_time() argument
95 if (!vfsuid_eq_kuid(i_uid_into_vfsuid(idmap, inode), in exfat_allow_set_time()
97 if (vfsgid_in_group_p(i_gid_into_vfsgid(idmap, inode))) in exfat_allow_set_time()
266 int exfat_getattr(struct mnt_idmap *idmap, const struct path *path, in exfat_getattr() argument
273 generic_fillattr(idmap, request_mask, inode, stat); in exfat_getattr()
282 int exfat_setattr(struct mnt_idmap *idmap, struct dentry *dentry, in exfat_setattr() argument
304 exfat_allow_set_time(idmap, sbi, inode)) { in exfat_setattr()
309 error = setattr_prepare(idmap, dentry, attr); in exfat_setattr()
315 (!uid_eq(from_vfsuid(idmap, i_user_ns(inode), attr->ia_vfsuid), in exfat_setattr()
318 (!gid_eq(from_vfsgid(idmap, i_user_ns(inode), attr->ia_vfsgid), in exfat_setattr()
[all …]
/fs/ramfs/
A Dinode.c98 ramfs_mknod(struct mnt_idmap *idmap, struct inode *dir, in ramfs_mknod() argument
122 static struct dentry *ramfs_mkdir(struct mnt_idmap *idmap, struct inode *dir, in ramfs_mkdir() argument
131 static int ramfs_create(struct mnt_idmap *idmap, struct inode *dir, in ramfs_create() argument
137 static int ramfs_symlink(struct mnt_idmap *idmap, struct inode *dir, in ramfs_symlink() argument
168 static int ramfs_tmpfile(struct mnt_idmap *idmap, in ramfs_tmpfile() argument
/fs/overlayfs/
A Dinode.c21 int ovl_setattr(struct mnt_idmap *idmap, struct dentry *dentry, in ovl_setattr() argument
288 int ovl_permission(struct mnt_idmap *idmap, in ovl_permission() argument
348 struct mnt_idmap *idmap, in ovl_idmap_posix_acl() argument
360 vfsuid = make_vfsuid(idmap, fs_userns, e->e_uid); in ovl_idmap_posix_acl()
364 vfsgid = make_vfsgid(idmap, fs_userns, e->e_gid); in ovl_idmap_posix_acl()
399 struct mnt_idmap *idmap; in ovl_get_acl_path() local
402 idmap = mnt_idmap(path->mnt); in ovl_get_acl_path()
407 real_acl = vfs_get_acl(idmap, path->dentry, acl_name); in ovl_get_acl_path()
425 ovl_idmap_posix_acl(realinode, idmap, clone); in ovl_get_acl_path()
440 struct posix_acl *do_ovl_get_acl(struct mnt_idmap *idmap, in do_ovl_get_acl() argument
[all …]

Completed in 89 milliseconds

12345678910