Home
last modified time | relevance | path

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

12345678910>>...13

/linux/fs/
H A Dmnt_idmapping.c80 vfsuid_t make_vfsuid(const struct mnt_idmap *idmap, in make_vfsuid() argument
86 if (idmap == &nop_mnt_idmap) in make_vfsuid()
88 if (idmap == &invalid_mnt_idmap) in make_vfsuid()
96 return VFSUIDT_INIT_RAW(map_id_down(&idmap->uid_map, uid)); in make_vfsuid()
120 vfsgid_t make_vfsgid(const struct mnt_idmap *idmap, in make_vfsgid() argument
125 if (idmap == &nop_mnt_idmap) in make_vfsgid()
127 if (idmap == &invalid_mnt_idmap) in make_vfsgid()
135 return VFSGIDT_INIT_RAW(map_id_down(&idmap->gid_map, gid)); in make_vfsgid()
150 kuid_t from_vfsuid(const struct mnt_idmap *idmap, in from_vfsuid() argument
155 if (idmap == &nop_mnt_idmap) in from_vfsuid()
[all …]
H A Dattr.c33 int setattr_should_drop_sgid(const struct mnt_idmap *idmap, in setattr_should_drop_sgid() argument
42 if (!in_group_or_capable(idmap, inode, i_gid_into_vfsgid(idmap, inode))) in setattr_should_drop_sgid()
63 int setattr_should_drop_suidgid(const struct mnt_idmap *idmap, in setattr_should_drop_suidgid() argument
73 kill |= setattr_should_drop_sgid(idmap, inode); in setattr_should_drop_suidgid()
94 static bool chown_ok(const struct mnt_idmap *idmap, in chown_ok() argument
97 vfsuid_t vfsuid = i_uid_into_vfsuid(idmap, inode); in chown_ok()
101 if (capable_wrt_inode_uidgid(idmap, inode, CAP_CHOWN)) in chown_ok()
121 static bool chgrp_ok(const struct mnt_idmap *idmap, in chgrp_ok() argument
124 vfsgid_t vfsgid = i_gid_into_vfsgid(idmap, inode); in chgrp_ok()
125 vfsuid_t vfsuid = i_uid_into_vfsuid(idmap, inode); in chgrp_ok()
[all …]
H A Dposix_acl.c121 static struct posix_acl *__get_acl(const struct mnt_idmap *idmap, in __get_acl() argument
164 acl = inode->i_op->get_acl(idmap, dentry, type); in __get_acl()
381 posix_acl_permission(const struct mnt_idmap *idmap, struct inode *inode, in posix_acl_permission() argument
396 vfsuid = i_uid_into_vfsuid(idmap, inode); in posix_acl_permission()
401 vfsuid = make_vfsuid(idmap, fs_userns, in posix_acl_permission()
407 vfsgid = i_gid_into_vfsgid(idmap, inode); in posix_acl_permission()
415 vfsgid = make_vfsgid(idmap, fs_userns, in posix_acl_permission()
611 posix_acl_chmod(const struct mnt_idmap *idmap, struct dentry *dentry, in posix_acl_chmod() argument
633 ret = inode->i_op->set_acl(idmap, dentry, acl, ACL_TYPE_ACCESS); in posix_acl_chmod()
712 int posix_acl_update_mode(const struct mnt_idmap *idmap, in posix_acl_update_mode() argument
[all …]
H A Dbad_inode.c30 static int bad_inode_create(const struct mnt_idmap *idmap, in bad_inode_create() argument
54 static int bad_inode_symlink(const struct mnt_idmap *idmap, in bad_inode_symlink() argument
61 static struct dentry *bad_inode_mkdir(const struct mnt_idmap *idmap, struct inode *dir, in bad_inode_mkdir() argument
72 static int bad_inode_mknod(const struct mnt_idmap *idmap, struct inode *dir, in bad_inode_mknod() argument
78 static int bad_inode_rename2(const struct mnt_idmap *idmap, in bad_inode_rename2() argument
92 static int bad_inode_permission(const struct mnt_idmap *idmap, in bad_inode_permission() argument
98 static int bad_inode_getattr(const struct mnt_idmap *idmap, in bad_inode_getattr() argument
105 static int bad_inode_setattr(const struct mnt_idmap *idmap, in bad_inode_setattr() argument
149 static int bad_inode_tmpfile(const struct mnt_idmap *idmap, in bad_inode_tmpfile() argument
156 static int bad_inode_set_acl(const struct mnt_idmap *idmap, in bad_inode_set_acl() argument
H A Dxattr.c91 * @idmap: idmap of the mount the inode was found from
103 int may_write_xattr(const struct mnt_idmap *idmap, struct inode *inode) in may_write_xattr() argument
109 if (HAS_UNMAPPED_ID(idmap, inode)) in may_write_xattr()
126 xattr_permission(const struct mnt_idmap *idmap, struct inode *inode, in xattr_permission() argument
132 ret = may_write_xattr(idmap, inode); in xattr_permission()
168 if (inode_owner_or_capable(idmap, inode)) in xattr_permission()
178 return inode_permission(idmap, inode, mask); in xattr_permission()
207 __vfs_setxattr(const struct mnt_idmap *idmap, struct dentry *dentry, in __vfs_setxattr() argument
223 return handler->set(handler, idmap, dentr in __vfs_setxattr()
245 __vfs_setxattr_noperm(const struct mnt_idmap * idmap,struct dentry * dentry,const char * name,const void * value,size_t size,int flags) __vfs_setxattr_noperm() argument
298 __vfs_setxattr_locked(const struct mnt_idmap * idmap,struct dentry * dentry,const char * name,const void * value,size_t size,int flags,struct delegated_inode * delegated_inode) __vfs_setxattr_locked() argument
327 vfs_setxattr(const struct mnt_idmap * idmap,struct dentry * dentry,const char * name,const void * value,size_t size,int flags) vfs_setxattr() argument
361 xattr_getsecurity(const struct mnt_idmap * idmap,struct inode * inode,const char * name,void * value,size_t size) xattr_getsecurity() argument
398 vfs_getxattr_alloc(const struct mnt_idmap * idmap,struct dentry * dentry,const char * name,char ** xattr_value,size_t xattr_size,gfp_t flags) vfs_getxattr_alloc() argument
451 vfs_getxattr(const struct mnt_idmap * idmap,struct dentry * dentry,const char * name,void * value,size_t size) vfs_getxattr() argument
530 __vfs_removexattr(const struct mnt_idmap * idmap,struct dentry * dentry,const char * name) __vfs_removexattr() argument
560 __vfs_removexattr_locked(const struct mnt_idmap * idmap,struct dentry * dentry,const char * name,struct delegated_inode * delegated_inode) __vfs_removexattr_locked() argument
592 vfs_removexattr(const struct mnt_idmap * idmap,struct dentry * dentry,const char * name) vfs_removexattr() argument
655 do_setxattr(const struct mnt_idmap * idmap,struct dentry * dentry,struct kernel_xattr_ctx * ctx) do_setxattr() argument
790 do_getxattr(const struct mnt_idmap * idmap,struct dentry * d,struct kernel_xattr_ctx * ctx) do_getxattr() argument
1032 removexattr(const struct mnt_idmap * idmap,struct dentry * d,const char * name) removexattr() argument
[all...]
H A Dinternal.h57 int may_linkat(const struct mnt_idmap *idmap, const struct path *link);
65 int vfs_tmpfile(const struct mnt_idmap *idmap,
214 bool in_group_or_capable(const struct mnt_idmap *idmap,
302 int may_write_xattr(const struct mnt_idmap *idmap, struct inode *inode);
305 int do_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
307 ssize_t do_get_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
310 static inline int do_set_acl(const struct mnt_idmap *idmap,
316 static inline ssize_t do_get_acl(const struct mnt_idmap *idmap, in do_set_acl()
330 const struct mnt_idmap *mnt_idmap_get(const struct mnt_idmap *idmap);
331 void mnt_idmap_put(const struct mnt_idmap *idmap);
312 do_set_acl(const struct mnt_idmap * idmap,struct dentry * dentry,const char * acl_name,const void * kvalue,size_t size) do_set_acl() argument
318 do_get_acl(const struct mnt_idmap * idmap,struct dentry * dentry,const char * acl_name,void * kvalue,size_t size) do_get_acl() argument
[all...]
H A Dnamei.c360 * @idmap: idmap of the mount the inode was found from
368 * If the inode has been found through an idmapped mount the idmap of
369 * the vfsmount must be passed through @idmap. This function will then take
370 * care to map the inode according to @idmap before checking permissions.
374 static int check_acl(const struct mnt_idmap *idmap, in check_acl() argument
387 return posix_acl_permission(idmap, inode, acl, mask); in check_acl()
394 int error = posix_acl_permission(idmap, inode, acl, mask); in check_acl()
424 * @idmap: idmap o
438 acl_permission_check(const struct mnt_idmap * idmap,struct inode * inode,int mask) acl_permission_check() argument
521 generic_permission(const struct mnt_idmap * idmap,struct inode * inode,int mask) generic_permission() argument
578 do_inode_permission(const struct mnt_idmap * idmap,struct inode * inode,int mask) do_inode_permission() argument
628 inode_permission(const struct mnt_idmap * idmap,struct inode * inode,int mask) inode_permission() argument
683 lookup_inode_permission_may_exec(const struct mnt_idmap * idmap,struct inode * inode,int mask) lookup_inode_permission_may_exec() argument
1276 const struct mnt_idmap *idmap; may_follow_link() local
1317 safe_hardlink_source(const struct mnt_idmap * idmap,struct inode * inode) safe_hardlink_source() argument
1360 may_linkat(const struct mnt_idmap * idmap,const struct path * link) may_linkat() argument
1410 may_create_in_sticky(const struct mnt_idmap * idmap,struct nameidata * nd,struct inode * const inode) may_create_in_sticky() argument
1955 may_lookup(const struct mnt_idmap * idmap,struct nameidata * restrict nd) may_lookup() argument
2599 const struct mnt_idmap *idmap; link_path_walk() local
3114 lookup_one_common(const struct mnt_idmap * idmap,struct qstr * qname,struct dentry * base) lookup_one_common() argument
3193 lookup_one(const struct mnt_idmap * idmap,struct qstr * name,struct dentry * base) lookup_one() argument
3226 lookup_one_unlocked(const struct mnt_idmap * idmap,struct qstr * name,struct dentry * base) lookup_one_unlocked() argument
3266 lookup_one_positive_killable(const struct mnt_idmap * idmap,struct qstr * name,struct dentry * base) lookup_one_positive_killable() argument
3309 lookup_one_positive_unlocked(const struct mnt_idmap * idmap,struct qstr * name,struct dentry * base) lookup_one_positive_unlocked() argument
3399 start_creating(const struct mnt_idmap * idmap,struct dentry * parent,struct qstr * name) start_creating() argument
3426 start_removing(const struct mnt_idmap * idmap,struct dentry * parent,struct qstr * name) start_removing() argument
3454 start_creating_killable(const struct mnt_idmap * idmap,struct dentry * parent,struct qstr * name) start_creating_killable() argument
3485 start_removing_killable(const struct mnt_idmap * idmap,struct dentry * parent,struct qstr * name) start_removing_killable() argument
3645 __check_sticky(const struct mnt_idmap * idmap,struct inode * dir,struct inode * inode) __check_sticky() argument
3678 may_delete_dentry(const struct mnt_idmap * idmap,struct inode * dir,struct dentry * victim,bool isdir) may_delete_dentry() argument
3731 may_create_dentry(const struct mnt_idmap * idmap,struct inode * dir,struct dentry * child) may_create_dentry() argument
4145 vfs_prepare_mode(const struct mnt_idmap * idmap,const struct inode * dir,umode_t mode,umode_t mask_perms,umode_t type) vfs_prepare_mode() argument
4177 vfs_create(const struct mnt_idmap * idmap,struct dentry * dentry,umode_t mode,struct delegated_inode * di) vfs_create() argument
4231 may_open(const struct mnt_idmap * idmap,const struct path * path,int acc_mode,int flag) may_open() argument
4290 handle_truncate(const struct mnt_idmap * idmap,struct file * filp) handle_truncate() argument
4315 may_o_create(const struct mnt_idmap * idmap,const struct path * dir,struct dentry * dentry,umode_t mode) may_o_create() argument
4435 const struct mnt_idmap *idmap; lookup_open() local
4794 const struct mnt_idmap *idmap; do_open() local
4876 vfs_tmpfile(const struct mnt_idmap * idmap,const struct path * parentpath,struct file * file,umode_t mode) vfs_tmpfile() argument
4934 kernel_tmpfile_open(const struct mnt_idmap * idmap,const struct path * parentpath,umode_t mode,int open_flag,const struct cred * cred) kernel_tmpfile_open() argument
5182 const struct mnt_idmap *idmap; dentry_create() local
5249 vfs_mknod(const struct mnt_idmap * idmap,struct inode * dir,struct dentry * dentry,umode_t mode,dev_t dev,struct delegated_inode * delegated_inode) vfs_mknod() argument
5307 const struct mnt_idmap *idmap; filename_mknodat() local
5391 vfs_mkdir(const struct mnt_idmap * idmap,struct inode * dir,struct dentry * dentry,umode_t mode,struct delegated_inode * delegated_inode) vfs_mkdir() argument
5498 vfs_rmdir(const struct mnt_idmap * idmap,struct inode * dir,struct dentry * dentry,struct delegated_inode * delegated_inode) vfs_rmdir() argument
5633 vfs_unlink(const struct mnt_idmap * idmap,struct inode * dir,struct dentry * dentry,struct delegated_inode * delegated_inode) vfs_unlink() argument
5783 vfs_symlink(const struct mnt_idmap * idmap,struct inode * dir,struct dentry * dentry,const char * oldname,struct delegated_inode * delegated_inode) vfs_symlink() argument
5885 vfs_link(struct dentry * old_dentry,const struct mnt_idmap * idmap,struct inode * dir,struct dentry * new_dentry,struct delegated_inode * delegated_inode) vfs_link() argument
5962 const struct mnt_idmap *idmap; filename_linkat() local
[all...]
/linux/fs/nfs/
H A Dnfs4idmap.c65 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/include/linux/
H A Dmnt_idmapping.h28 static inline bool is_valid_mnt_idmap(const struct mnt_idmap *idmap) in is_valid_mnt_idmap() argument
30 return idmap != &nop_mnt_idmap && idmap != &invalid_mnt_idmap; in is_valid_mnt_idmap()
124 const struct mnt_idmap *mnt_idmap_get(const struct mnt_idmap *idmap);
125 void mnt_idmap_put(const struct mnt_idmap *idmap);
127 vfsuid_t make_vfsuid(const struct mnt_idmap *idmap,
130 vfsgid_t make_vfsgid(const struct mnt_idmap *idmap,
133 kuid_t from_vfsuid(const struct mnt_idmap *idmap,
136 kgid_t from_vfsgid(const struct mnt_idmap *idmap,
151 static inline bool vfsuid_has_fsmapping(const struct mnt_idmap *idmap, in vfsuid_has_fsmapping() argument
155 return uid_valid(from_vfsuid(idmap, fs_userns, vfsuid)); in vfsuid_has_fsmapping()
[all …]
H A Dposix_acl.h108 int vfs_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
110 struct posix_acl *vfs_get_acl(const struct mnt_idmap *idmap,
112 int vfs_remove_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
117 static inline int posix_acl_chmod(const struct mnt_idmap *idmap, in posix_acl_chmod() argument
144 static inline int vfs_set_acl(const struct mnt_idmap *idmap, in vfs_set_acl() argument
151 static inline struct posix_acl *vfs_get_acl(const struct mnt_idmap *idmap, in vfs_get_acl() argument
158 static inline int vfs_remove_acl(const struct mnt_idmap *idmap, in vfs_remove_acl() argument
H A Dnamei.h75 struct dentry *lookup_one_unlocked(const struct mnt_idmap *idmap,
77 struct dentry *lookup_one_positive_unlocked(const struct mnt_idmap *idmap,
80 struct dentry *lookup_one_positive_killable(const struct mnt_idmap *idmap,
84 struct dentry *start_creating(const struct mnt_idmap *idmap, struct dentry *parent,
86 struct dentry *start_removing(const struct mnt_idmap *idmap, struct dentry *parent,
88 struct dentry *start_creating_killable(const struct mnt_idmap *idmap,
91 struct dentry *start_removing_killable(const struct mnt_idmap *idmap,
/linux/fs/smb/server/
H A Dvfs.h77 void ksmbd_vfs_query_maximal_access(const struct mnt_idmap *idmap,
108 ssize_t ksmbd_vfs_getxattr(const struct mnt_idmap *idmap,
112 ssize_t ksmbd_vfs_xattr_len(const struct mnt_idmap *idmap,
114 ssize_t ksmbd_vfs_getcasexattr(const struct mnt_idmap *idmap,
117 ssize_t ksmbd_vfs_casexattr_len(const struct mnt_idmap *idmap,
120 int ksmbd_vfs_setxattr(const struct mnt_idmap *idmap,
126 int ksmbd_vfs_remove_xattr(const struct mnt_idmap *idmap,
156 const struct mnt_idmap *idmap,
161 int ksmbd_vfs_remove_acl_xattrs(const struct mnt_idmap *idmap,
163 int ksmbd_vfs_remove_sd_xattrs(const struct mnt_idmap *idmap, cons
[all...]
H A Dvfs.c124 void ksmbd_vfs_query_maximal_access(const struct mnt_idmap *idmap, in ksmbd_vfs_query_maximal_access()
130 if (!inode_permission(idmap, d_inode(dentry), MAY_OPEN | MAY_WRITE)) in ksmbd_vfs_query_maximal_access()
136 if (!inode_permission(idmap, d_inode(dentry), MAY_OPEN | MAY_READ)) in ksmbd_vfs_query_maximal_access()
139 if (!inode_permission(idmap, d_inode(dentry), MAY_OPEN | MAY_EXEC))
142 if (!inode_permission(idmap, d_inode(dentry->d_parent), MAY_EXEC | MAY_WRITE))
193 const struct mnt_idmap *idmap; in ksmbd_vfs_mkdir()
209 idmap = mnt_idmap(path.mnt); in ksmbd_vfs_mkdir()
212 dentry = vfs_mkdir(idmap, d_inode(path.dentry), dentry, mode, NULL); in ksmbd_vfs_mkdir()
226 ssize_t ksmbd_vfs_getcasexattr(const struct mnt_idmap *idmap, in ksmbd_vfs_getcasexattr()
243 value_len = ksmbd_vfs_getxattr(idmap, in ksmbd_vfs_getcasexattr()
118 ksmbd_vfs_query_maximal_access(const struct mnt_idmap * idmap,struct dentry * dentry,__le32 * daccess) ksmbd_vfs_query_maximal_access() argument
186 const struct mnt_idmap *idmap; ksmbd_vfs_mkdir() local
219 ksmbd_vfs_getcasexattr(const struct mnt_idmap * idmap,struct dentry * dentry,char * attr_name,int attr_name_len,char ** attr_value) ksmbd_vfs_getcasexattr() argument
389 const struct mnt_idmap *idmap = file_mnt_idmap(fp->filp); ksmbd_vfs_stream_write() local
580 const struct mnt_idmap *idmap; ksmbd_vfs_remove_file() local
844 ksmbd_vfs_xattr_len(const struct mnt_idmap * idmap,struct dentry * dentry,char * xattr_name) ksmbd_vfs_xattr_len() argument
859 ksmbd_vfs_getxattr(const struct mnt_idmap * idmap,struct dentry * dentry,char * xattr_name,char ** xattr_buf) ksmbd_vfs_getxattr() argument
896 ksmbd_vfs_setxattr(const 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
1180 ksmbd_vfs_remove_xattr(const struct mnt_idmap * idmap,const struct path * path,char * attr_name,bool get_write) ksmbd_vfs_remove_xattr() argument
1205 const struct mnt_idmap *idmap = file_mnt_idmap(filp); ksmbd_vfs_unlink() local
1474 ksmbd_vfs_remove_acl_xattrs(const struct mnt_idmap * idmap,const struct path * path) ksmbd_vfs_remove_acl_xattrs() argument
1514 ksmbd_vfs_remove_sd_xattrs(const struct mnt_idmap * idmap,const struct path * path) ksmbd_vfs_remove_sd_xattrs() argument
1543 ksmbd_vfs_make_xattr_posix_acl(const struct mnt_idmap * idmap,struct inode * inode,int acl_type) ksmbd_vfs_make_xattr_posix_acl() argument
1609 ksmbd_vfs_set_sd_xattr(struct ksmbd_conn * conn,const struct mnt_idmap * idmap,const struct path * path,struct smb_ntsd * pntsd,int len,bool get_write) ksmbd_vfs_set_sd_xattr() argument
1676 ksmbd_vfs_get_sd_xattr(struct ksmbd_conn * conn,const struct mnt_idmap * idmap,struct dentry * dentry,struct smb_ntsd ** pntsd) ksmbd_vfs_get_sd_xattr() argument
1745 ksmbd_vfs_set_dos_attrib_xattr(const struct mnt_idmap * idmap,const struct path * path,struct xattr_dos_attrib * da,bool get_write) ksmbd_vfs_set_dos_attrib_xattr() argument
1767 ksmbd_vfs_get_dos_attrib_xattr(const struct mnt_idmap * idmap,struct dentry * dentry,struct xattr_dos_attrib * da) ksmbd_vfs_get_dos_attrib_xattr() argument
1823 ksmbd_vfs_fill_dentry_attrs(struct ksmbd_work * work,const struct mnt_idmap * idmap,struct dentry * dentry,struct ksmbd_kstat * ksmbd_kstat) ksmbd_vfs_fill_dentry_attrs() argument
1898 ksmbd_vfs_casexattr_len(const struct mnt_idmap * idmap,struct dentry * dentry,char * attr_name,int attr_name_len) ksmbd_vfs_casexattr_len() argument
2213 ksmbd_vfs_set_init_posix_acl(const struct mnt_idmap * idmap,const struct path * path) ksmbd_vfs_set_init_posix_acl() argument
2266 ksmbd_vfs_inherit_posix_acl(const struct mnt_idmap * idmap,const struct path * path,struct inode * parent_inode) ksmbd_vfs_inherit_posix_acl() argument
2329 const struct mnt_idmap *idmap = file_mnt_idmap(fp->filp); __ksmbd_vfs_set_compression() local
[all...]
H A Dsmbacl.h85 int parse_sec_desc(const struct mnt_idmap *idmap, struct smb_ntsd *pntsd,
87 int build_sec_desc(const struct mnt_idmap *idmap, struct smb_ntsd *pntsd,
110 static inline uid_t posix_acl_uid_translate(const struct mnt_idmap *idmap, in posix_acl_uid_translate()
116 vfsuid = make_vfsuid(idmap, &init_user_ns, pace->e_uid); in posix_acl_uid_translate()
122 static inline gid_t posix_acl_gid_translate(const struct mnt_idmap *idmap, in posix_acl_gid_translate()
128 vfsgid = make_vfsgid(idmap, &init_user_ns, pace->e_gid); in posix_acl_gid_translate()
108 posix_acl_uid_translate(const struct mnt_idmap * idmap,struct posix_acl_entry * pace) posix_acl_uid_translate() argument
120 posix_acl_gid_translate(const struct mnt_idmap * idmap,struct posix_acl_entry * pace) posix_acl_gid_translate() argument
H A Dsmbacl.c262 static int sid_to_id(const struct mnt_idmap *idmap, in sid_to_id()
296 uid = from_vfsuid(idmap, &init_user_ns, VFSUIDT_INIT(uid)); in sid_to_id()
313 gid = from_vfsgid(idmap, &init_user_ns, VFSGIDT_INIT(gid)); in sid_to_id()
388 static int parse_dacl(const struct mnt_idmap *idmap, in parse_dacl()
533 ret = sid_to_id(idmap, &ppace[i]->sid, SIDOWNER, &temp_fattr); in parse_dacl()
630 static void set_posix_acl_entries_dacl(const struct mnt_idmap *idmap, in set_posix_acl_entries_dacl()
657 uid = posix_acl_uid_translate(idmap, pace); in set_posix_acl_entries_dacl()
664 gid = posix_acl_gid_translate(idmap, pace); in set_posix_acl_entries_dacl()
733 uid = posix_acl_uid_translate(idmap, pace); in set_posix_acl_entries_dacl()
738 gid = posix_acl_gid_translate(idmap, pac in set_posix_acl_entries_dacl()
260 sid_to_id(const struct mnt_idmap * idmap,struct smb_sid * psid,uint sidtype,struct smb_fattr * fattr) sid_to_id() argument
386 parse_dacl(const struct mnt_idmap * idmap,struct smb_acl * pdacl,char * end_of_acl,struct smb_sid * pownersid,struct smb_sid * pgrpsid,struct smb_fattr * fattr) parse_dacl() argument
622 set_posix_acl_entries_dacl(const struct mnt_idmap * idmap,struct smb_ace * pndace,struct smb_fattr * fattr,u16 * num_aces,u16 * size,u16 existing_nt_aces,bool had_nt_aces) set_posix_acl_entries_dacl() argument
753 set_ntacl_dacl(const 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
812 set_mode_dacl(const struct mnt_idmap * idmap,struct smb_acl * pndacl,struct smb_fattr * fattr) set_mode_dacl() argument
898 parse_sec_desc(const struct mnt_idmap * idmap,struct smb_ntsd * pntsd,int acl_len,struct smb_fattr * fattr) parse_sec_desc() argument
1033 build_sec_desc(const 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
1199 const struct mnt_idmap *idmap = mnt_idmap(path->mnt); smb_inherit_dacl() local
1454 const struct mnt_idmap *idmap = mnt_idmap(path->mnt); smb_check_perm_dacl() local
1676 const struct mnt_idmap *idmap = mnt_idmap(path->mnt); set_info_sec() local
[all...]
/linux/kernel/bpf/
H A Dstates.c338 * So we look through our idmap to see if this old id has been seen before. If in check_ids()
341 static bool check_ids(u32 old_id, u32 cur_id, struct bpf_idmap *idmap) in check_ids()
343 struct bpf_id_pair *map = idmap->map; in check_ids()
353 for (i = 0; i < idmap->cnt; i++) { in check_ids()
361 if (idmap->cnt < BPF_ID_MAP_SIZE) {
362 map[idmap->cnt].old = old_id;
363 map[idmap->cnt].cur = cur_id;
364 idmap->cnt++;
369 * idmap slots are bounded by the number of registers and stack slots.
398 * (r3 derived from unrelated r4). Without the base check, idmap get
319 check_ids(u32 old_id,u32 cur_id,struct bpf_idmap * idmap) check_ids() argument
380 check_scalar_ids(u32 old_id,u32 cur_id,struct bpf_idmap * idmap) check_scalar_ids() argument
490 regs_exact(const struct bpf_reg_state * rold,const struct bpf_reg_state * rcur,struct bpf_idmap * idmap) regs_exact() argument
506 regsafe(struct bpf_verifier_env * env,struct bpf_reg_state * rold,struct bpf_reg_state * rcur,struct bpf_idmap * idmap,enum exact_level exact) regsafe() argument
702 stacksafe(struct bpf_verifier_env * env,struct bpf_func_state * old,struct bpf_func_state * cur,struct bpf_idmap * idmap,enum exact_level exact) stacksafe() argument
847 stack_arg_safe(struct bpf_verifier_env * env,struct bpf_func_state * old,struct bpf_func_state * cur,struct bpf_idmap * idmap,enum exact_level exact) stack_arg_safe() argument
869 refsafe(struct bpf_verifier_state * old,struct bpf_verifier_state * cur,struct bpf_idmap * idmap) refsafe() argument
973 struct bpf_idmap *idmap = &env->idmap_scratch; reset_idmap_scratch() local
[all...]
/linux/Documentation/admin-guide/nfs/
H A Dnfs-idmapper.rst9 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 Dxfs_iops.c172 const struct mnt_idmap *idmap, in xfs_generic_create() argument
180 .idmap = idmap, in xfs_generic_create()
282 const 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 const struct mnt_idmap *idmap, in xfs_vn_create() argument
298 return xfs_generic_create(idmap, dir, dentry, mode, 0, NULL); in xfs_vn_create()
303 const struct mnt_idmap *idmap, in xfs_vn_mkdir() argument
308 return ERR_PTR(xfs_generic_create(idmap, dir, dentry, mode, 0, NULL)); in xfs_vn_mkdir()
428 const struct mnt_idmap *idmap, in xfs_vn_symlink() argument
469 xfs_vn_rename(const struct mnt_idmap * idmap,struct inode * odir,struct dentry * odentry,struct inode * ndir,struct dentry * ndentry,unsigned int flags) xfs_vn_rename() argument
682 xfs_vn_getattr(const struct mnt_idmap * idmap,const struct path * path,struct kstat * stat,u32 request_mask,unsigned int query_flags) xfs_vn_getattr() argument
757 xfs_vn_change_ok(const struct mnt_idmap * idmap,struct dentry * dentry,struct iattr * iattr) xfs_vn_change_ok() argument
780 xfs_setattr_nonsize(const struct mnt_idmap * idmap,struct dentry * dentry,struct xfs_inode * ip,struct iattr * iattr) xfs_setattr_nonsize() argument
906 xfs_vn_setattr_size(const struct mnt_idmap * idmap,struct dentry * dentry,struct iattr * iattr) xfs_vn_setattr_size() argument
1133 xfs_vn_setattr(const struct mnt_idmap * idmap,struct dentry * dentry,struct iattr * iattr) xfs_vn_setattr() argument
1253 xfs_vn_tmpfile(const struct mnt_idmap * idmap,struct inode * dir,struct file * file,umode_t mode) xfs_vn_tmpfile() argument
[all...]
/linux/fs/fuse/
H A Dreq.c7 const struct mnt_idmap *idmap) in fuse_fill_creds() argument
11 kuid_t fsuid = mapped_fsuid(idmap, fc->user_ns); in fuse_fill_creds()
12 kgid_t fsgid = mapped_fsgid(idmap, fc->user_ns); in fuse_fill_creds()
35 * only along with "inode creation" fuse requests, otherwise idmap == in fuse_fill_creds()
52 ssize_t __fuse_simple_request(const struct mnt_idmap *idmap, struct fuse_mount *fm,
56 int err = fuse_fill_creds(fm, args, idmap); in fuse_req_prep()
54 fuse_req_prep(struct fuse_mount * fm,struct fuse_args * args,const struct mnt_idmap * idmap) fuse_req_prep() argument
62 __fuse_simple_request(const struct mnt_idmap * idmap,struct fuse_mount * fm,struct fuse_args * args) __fuse_simple_request() argument
H A Ddir.c758 static int get_create_supp_group(const struct mnt_idmap *idmap, in get_create_supp_group()
766 vfsgid_t vfsgid = make_vfsgid(idmap, fc->user_ns, kgid); in get_create_supp_group()
789 static int get_create_ext(const struct mnt_idmap *idmap, in get_create_ext()
801 err = get_create_supp_group(idmap, dir, &ext); in get_create_ext()
827 static int fuse_create_open(const struct mnt_idmap *idmap, struct inode *dir, in fuse_create_open()
887 err = get_create_ext(idmap, &args, dir, entry, mode); in fuse_create_open()
891 err = fuse_simple_idmap_request(idmap, fm, &args); in fuse_create_open()
949 const struct mnt_idmap *idmap = file_mnt_idmap(file); in fuse_atomic_open()
970 err = fuse_create_open(idmap, dir, entry, file, flags, mode, FUSE_CREATE); in fuse_atomic_open()
979 err = fuse_mknod(idmap, di in fuse_atomic_open()
754 get_create_supp_group(const struct mnt_idmap * idmap,struct inode * dir,struct fuse_in_arg * ext) get_create_supp_group() argument
785 get_create_ext(const struct mnt_idmap * idmap,struct fuse_args * args,struct inode * dir,struct dentry * dentry,umode_t mode) get_create_ext() argument
823 fuse_create_open(const struct mnt_idmap * idmap,struct inode * dir,struct dentry * entry,struct file * file,unsigned int flags,umode_t mode,u32 opcode) fuse_create_open() argument
944 const struct mnt_idmap *idmap = file_mnt_idmap(file); fuse_atomic_open() local
983 create_new_entry(const struct mnt_idmap * idmap,struct fuse_mount * fm,struct fuse_args * args,struct inode * dir,struct dentry * entry,umode_t mode) create_new_entry() argument
1056 create_new_nondir(const struct mnt_idmap * idmap,struct fuse_mount * fm,struct fuse_args * args,struct inode * dir,struct dentry * entry,umode_t mode) create_new_nondir() argument
1072 fuse_mknod(const struct mnt_idmap * idmap,struct inode * dir,struct dentry * entry,umode_t mode,dev_t rdev) fuse_mknod() argument
1095 fuse_create(const struct mnt_idmap * idmap,struct inode * dir,struct dentry * entry,umode_t mode) fuse_create() argument
1101 fuse_tmpfile(const struct mnt_idmap * idmap,struct inode * dir,struct file * file,umode_t mode) fuse_tmpfile() argument
1119 fuse_mkdir(const struct mnt_idmap * idmap,struct inode * dir,struct dentry * entry,umode_t mode) fuse_mkdir() argument
1149 fuse_symlink(const struct mnt_idmap * idmap,struct inode * dir,struct dentry * entry,const char * link) fuse_symlink() argument
1259 fuse_rename_common(const struct mnt_idmap * idmap,struct inode * olddir,struct dentry * oldent,struct inode * newdir,struct dentry * newent,unsigned int flags,int opcode,size_t argsize) fuse_rename_common() argument
1310 fuse_rename2(const struct mnt_idmap * idmap,struct inode * olddir,struct dentry * oldent,struct inode * newdir,struct dentry * newent,unsigned int flags) fuse_rename2() argument
1379 fuse_fillattr(const struct mnt_idmap * idmap,struct inode * inode,struct fuse_attr * attr,struct kstat * stat) fuse_fillattr() argument
1433 fuse_do_statx(const struct mnt_idmap * idmap,struct inode * inode,struct file * file,struct kstat * stat) fuse_do_statx() argument
1494 fuse_do_getattr(const struct mnt_idmap * idmap,struct inode * inode,struct kstat * stat,struct file * file) fuse_do_getattr() argument
1540 fuse_update_get_attr(const struct mnt_idmap * idmap,struct inode * inode,struct file * file,struct kstat * stat,u32 request_mask,unsigned int flags) fuse_update_get_attr() argument
1766 fuse_permission(const struct mnt_idmap * idmap,struct inode * inode,int mask) fuse_permission() argument
2004 iattr_to_fattr(const struct mnt_idmap * idmap,struct fuse_conn * fc,struct iattr * iattr,struct fuse_setattr_in * arg,bool trust_local_cmtime) iattr_to_fattr() argument
2146 fuse_do_setattr(const struct mnt_idmap * idmap,struct dentry * dentry,struct iattr * attr,struct file * file) fuse_do_setattr() argument
2327 fuse_setattr(const struct mnt_idmap * idmap,struct dentry * entry,struct iattr * attr) fuse_setattr() argument
2390 fuse_getattr(const struct mnt_idmap * idmap,const struct path * path,struct kstat * stat,u32 request_mask,unsigned int flags) fuse_getattr() argument
[all...]
/linux/security/integrity/evm/
H A Devm_main.c474 * @idmap: idmap of the mount
484 static int evm_xattr_change(const struct mnt_idmap *idmap, in evm_xattr_change() argument
520 static int evm_protect_xattr(const struct mnt_idmap *idmap, in evm_protect_xattr() argument
582 !evm_xattr_change(idmap, dentry, xattr_name, xattr_value, in evm_protect_xattr()
597 * @idmap: idmap of the mount
610 static int evm_inode_setxattr(const struct mnt_idmap *idmap, struct dentry *dentry, in evm_inode_setxattr() argument
629 return evm_protect_xattr(idmap, dentry, xattr_name, xattr_value, in evm_inode_setxattr()
635 * @idmap
642 evm_inode_removexattr(const struct mnt_idmap * idmap,struct dentry * dentry,const char * xattr_name) evm_inode_removexattr() argument
655 evm_inode_set_acl_change(const struct mnt_idmap * idmap,struct dentry * dentry,const char * name,struct posix_acl * kacl) evm_inode_set_acl_change() argument
674 evm_inode_set_acl_change(const struct mnt_idmap * idmap,struct dentry * dentry,const char * name,struct posix_acl * kacl) evm_inode_set_acl_change() argument
696 evm_inode_set_acl(const struct mnt_idmap * idmap,struct dentry * dentry,const char * acl_name,struct posix_acl * kacl) evm_inode_set_acl() argument
748 evm_inode_remove_acl(const struct mnt_idmap * idmap,struct dentry * dentry,const char * acl_name) evm_inode_remove_acl() argument
929 evm_inode_post_remove_acl(const struct mnt_idmap * idmap,struct dentry * dentry,const char * acl_name) evm_inode_post_remove_acl() argument
936 evm_attr_change(const struct mnt_idmap * idmap,struct dentry * dentry,struct iattr * attr) evm_attr_change() argument
959 evm_inode_setattr(const struct mnt_idmap * idmap,struct dentry * dentry,struct iattr * attr) evm_inode_setattr() argument
1011 evm_inode_post_setattr(const struct mnt_idmap * idmap,struct dentry * dentry,int ia_valid) evm_inode_post_setattr() argument
1143 evm_post_path_mknod(const struct mnt_idmap * idmap,struct dentry * dentry) evm_post_path_mknod() argument
[all...]
/linux/fs/smb/client/
H A Dcifsfs.h56 int cifs_create(const struct mnt_idmap *idmap, struct inode *dir,
60 int cifs_tmpfile(const struct mnt_idmap *idmap, struct inode *dir,
67 int cifs_mknod(const struct mnt_idmap *idmap, struct inode *inode,
69 struct dentry *cifs_mkdir(const struct mnt_idmap *idmap, struct inode *inode,
72 int cifs_rename2(const struct mnt_idmap *idmap, struct inode *source_dir,
81 int cifs_getattr(const struct mnt_idmap *idmap, const struct path *path,
83 int cifs_setattr(const struct mnt_idmap *idmap, struct dentry *direntry,
94 int cifs_fileattr_set(const struct mnt_idmap *idmap, struct dentry *dentry,
134 int cifs_symlink(const struct mnt_idmap *idmap, struct inode *inode,
/linux/fs/overlayfs/
H A Dinode.c21 int ovl_setattr(const struct mnt_idmap *idmap, struct dentry *dentry, in ovl_setattr() argument
29 err = setattr_prepare(idmap, dentry, attr); in ovl_setattr()
33 /* Rebase ownership from the mount idmap into overlay id space. */ in ovl_setattr()
35 attr->ia_vfsuid = VFSUIDT_INIT(from_vfsuid(idmap, in ovl_setattr()
38 attr->ia_vfsgid = VFSGIDT_INIT(from_vfsgid(idmap, in ovl_setattr()
171 int ovl_getattr(const struct mnt_idmap *idmap, const struct path *path, in ovl_getattr() argument
297 /* Map ownership of the real inode through the overlay mount idmap. */ in ovl_getattr()
298 vfsuid = make_vfsuid(idmap, i_user_ns(inode), stat->uid); in ovl_getattr()
299 vfsgid = make_vfsgid(idmap, i_user_ns(inode), stat->gid); in ovl_getattr()
306 int ovl_permission(const struct mnt_idmap *idmap, in ovl_permission() argument
358 ovl_idmap_posix_acl(const struct inode * realinode,const struct mnt_idmap * idmap,struct posix_acl * acl) ovl_idmap_posix_acl() argument
409 const struct mnt_idmap *idmap; ovl_get_acl_path() local
450 do_ovl_get_acl(const struct mnt_idmap * idmap,struct inode * inode,int type,bool rcu,bool noperm) do_ovl_get_acl() argument
539 ovl_set_acl(const struct mnt_idmap * idmap,struct dentry * dentry,struct posix_acl * acl,int type) ovl_set_acl() argument
653 ovl_fileattr_set(const struct mnt_idmap * idmap,struct dentry * dentry,struct file_kattr * fa) ovl_fileattr_set() argument
[all...]
/linux/fs/efivarfs/
H A Dinode.c77 static int efivarfs_create(const struct mnt_idmap *idmap, struct inode *dir, in efivarfs_create() argument
153 efivarfs_fileattr_set(const struct mnt_idmap *idmap, in efivarfs_fileattr_set() argument
173 static int efivarfs_setattr(const 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/ntfs/
H A Dea.h31 struct posix_acl *ntfs_get_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
33 int ntfs_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
35 int ntfs_init_acl(const struct mnt_idmap *idmap, struct inode *inode,

12345678910>>...13