Home
last modified time | relevance | path

Searched refs:vfsuid (Results 1 – 21 of 21) sorted by relevance

/linux-6.6.21/include/linux/
Dmnt_idmapping.h79 static inline bool vfsuid_eq_kuid(vfsuid_t vfsuid, kuid_t kuid) in vfsuid_eq_kuid() argument
81 return vfsuid_valid(vfsuid) && __vfsuid_val(vfsuid) == __kuid_val(kuid); in vfsuid_eq_kuid()
125 struct user_namespace *fs_userns, vfsuid_t vfsuid);
144 vfsuid_t vfsuid) in vfsuid_has_fsmapping() argument
146 return uid_valid(from_vfsuid(idmap, fs_userns, vfsuid)); in vfsuid_has_fsmapping()
150 vfsuid_t vfsuid) in vfsuid_has_mapping() argument
152 return from_kuid(userns, AS_KUIDT(vfsuid)) != (uid_t)-1; in vfsuid_has_mapping()
163 static inline kuid_t vfsuid_into_kuid(vfsuid_t vfsuid) in vfsuid_into_kuid() argument
165 return AS_KUIDT(vfsuid); in vfsuid_into_kuid()
/linux-6.6.21/fs/
Dattr.c101 vfsuid_t vfsuid = i_uid_into_vfsuid(idmap, inode); in chown_ok() local
102 if (vfsuid_eq_kuid(vfsuid, current_fsuid()) && in chown_ok()
103 vfsuid_eq(ia_vfsuid, vfsuid)) in chown_ok()
107 if (!vfsuid_valid(vfsuid) && in chown_ok()
129 vfsuid_t vfsuid = i_uid_into_vfsuid(idmap, inode); in chgrp_ok() local
130 if (vfsuid_eq_kuid(vfsuid, current_fsuid())) { in chgrp_ok()
Dmnt_idmapping.c165 struct user_namespace *fs_userns, vfsuid_t vfsuid) in from_vfsuid() argument
171 return AS_KUIDT(vfsuid); in from_vfsuid()
172 uid = from_kuid(mnt_userns, AS_KUIDT(vfsuid)); in from_vfsuid()
Dposix_acl.c382 vfsuid_t vfsuid; in posix_acl_permission() local
391 vfsuid = i_uid_into_vfsuid(idmap, inode); in posix_acl_permission()
392 if (vfsuid_eq_kuid(vfsuid, current_fsuid())) in posix_acl_permission()
396 vfsuid = make_vfsuid(idmap, fs_userns, in posix_acl_permission()
398 if (vfsuid_eq_kuid(vfsuid, current_fsuid())) in posix_acl_permission()
898 vfsuid_t vfsuid; in vfs_posix_acl_to_xattr() local
918 vfsuid = make_vfsuid(idmap, fs_userns, acl_e->e_uid); in vfs_posix_acl_to_xattr()
920 caller_userns, vfsuid_into_kuid(vfsuid))); in vfs_posix_acl_to_xattr()
Dinode.c2405 vfsuid_t vfsuid; in inode_owner_or_capable() local
2408 vfsuid = i_uid_into_vfsuid(idmap, inode); in inode_owner_or_capable()
2409 if (vfsuid_eq_kuid(vfsuid, current_fsuid())) in inode_owner_or_capable()
2413 if (vfsuid_has_mapping(ns, vfsuid) && ns_capable(ns, CAP_FOWNER)) in inode_owner_or_capable()
Dexec.c1609 vfsuid_t vfsuid; in bprm_fill_uid() local
1629 vfsuid = i_uid_into_vfsuid(idmap, inode); in bprm_fill_uid()
1634 if (!vfsuid_has_mapping(bprm->cred->user_ns, vfsuid) || in bprm_fill_uid()
1640 bprm->cred->euid = vfsuid_into_kuid(vfsuid); in bprm_fill_uid()
Dstat.c49 vfsuid_t vfsuid = i_uid_into_vfsuid(idmap, inode); in generic_fillattr() local
56 stat->uid = vfsuid_into_kuid(vfsuid); in generic_fillattr()
Dnamei.c343 vfsuid_t vfsuid; in acl_permission_check() local
346 vfsuid = i_uid_into_vfsuid(idmap, inode); in acl_permission_check()
347 if (likely(vfsuid_eq_kuid(vfsuid, current_fsuid()))) { in acl_permission_check()
1105 vfsuid_t vfsuid; in may_follow_link() local
1111 vfsuid = i_uid_into_vfsuid(idmap, inode); in may_follow_link()
1113 if (vfsuid_eq_kuid(vfsuid, current_fsuid())) in may_follow_link()
1121 if (vfsuid_valid(nd->dir_vfsuid) && vfsuid_eq(nd->dir_vfsuid, vfsuid)) in may_follow_link()
Dlocks.c1874 vfsuid_t vfsuid = i_uid_into_vfsuid(file_mnt_idmap(filp), inode); in generic_setlease() local
1877 if ((!vfsuid_eq_kuid(vfsuid, current_fsuid())) && !capable(CAP_LEASE)) in generic_setlease()
/linux-6.6.21/fs/smb/server/
Dsmbacl.h217 vfsuid_t vfsuid; in posix_acl_uid_translate() local
220 vfsuid = make_vfsuid(idmap, &init_user_ns, pace->e_uid); in posix_acl_uid_translate()
223 return from_kuid(&init_user_ns, vfsuid_into_kuid(vfsuid)); in posix_acl_uid_translate()
Dndr.c348 vfsuid_t vfsuid; in ndr_encode_posix_acl() local
377 vfsuid = i_uid_into_vfsuid(idmap, inode); in ndr_encode_posix_acl()
378 ret = ndr_write_int64(n, from_kuid(&init_user_ns, vfsuid_into_kuid(vfsuid))); in ndr_encode_posix_acl()
Doplock.c1710 vfsuid_t vfsuid = i_uid_into_vfsuid(idmap, inode); in create_posix_rsp_buf() local
1753 id_to_sid(from_kuid_munged(&init_user_ns, vfsuid_into_kuid(vfsuid)), in create_posix_rsp_buf()
Dsmb2pdu.c2629 vfsuid_t vfsuid = i_uid_into_vfsuid(idmap, inode); in ksmbd_acls_fattr() local
2632 fattr->cf_uid = vfsuid_into_kuid(vfsuid); in ksmbd_acls_fattr()
4853 vfsuid_t vfsuid = i_uid_into_vfsuid(idmap, inode); in find_file_posix_info() local
4879 id_to_sid(from_kuid_munged(&init_user_ns, vfsuid_into_kuid(vfsuid)), in find_file_posix_info()
/linux-6.6.21/security/apparmor/
Dlsm.c236 vfsuid_t vfsuid = i_uid_into_vfsuid(mnt_idmap(path->mnt), in common_perm_cond() local
239 vfsuid_into_kuid(vfsuid), in common_perm_cond()
282 vfsuid_t vfsuid; in common_perm_rm() local
287 vfsuid = i_uid_into_vfsuid(mnt_idmap(dir->mnt), inode); in common_perm_rm()
288 cond.uid = vfsuid_into_kuid(vfsuid); in common_perm_rm()
388 vfsuid_t vfsuid; in apparmor_path_rename() local
396 vfsuid = i_uid_into_vfsuid(idmap, d_backing_inode(old_dentry)); in apparmor_path_rename()
397 cond.uid = vfsuid_into_kuid(vfsuid); in apparmor_path_rename()
403 vfsuid = i_uid_into_vfsuid(idmap, d_backing_inode(old_dentry)); in apparmor_path_rename()
404 cond_exchange.uid = vfsuid_into_kuid(vfsuid); in apparmor_path_rename()
[all …]
Dfile.c491 vfsuid_t vfsuid = i_uid_into_vfsuid(file_mnt_idmap(file), in __file_path_perm() local
494 .uid = vfsuid_into_kuid(vfsuid), in __file_path_perm()
Ddomain.c881 vfsuid_t vfsuid = i_uid_into_vfsuid(file_mnt_idmap(bprm->file), in apparmor_bprm_creds_for_exec() local
884 vfsuid_into_kuid(vfsuid), in apparmor_bprm_creds_for_exec()
995 vfsuid_into_kuid(vfsuid), info, error)); in apparmor_bprm_creds_for_exec()
/linux-6.6.21/fs/xfs/
Dxfs_itable.c69 vfsuid_t vfsuid; in xfs_bulkstat_one_int() local
97 vfsuid = i_uid_into_vfsuid(idmap, inode); in xfs_bulkstat_one_int()
105 buf->bs_uid = from_kuid(sb_userns, vfsuid_into_kuid(vfsuid)); in xfs_bulkstat_one_int()
Dxfs_iops.c560 vfsuid_t vfsuid = i_uid_into_vfsuid(idmap, inode); in xfs_vn_getattr() local
572 stat->uid = vfsuid_into_kuid(vfsuid); in xfs_vn_getattr()
/linux-6.6.21/fs/overlayfs/
Dutil.c1400 vfsuid_t vfsuid; in ovl_copyattr() local
1406 vfsuid = i_uid_into_vfsuid(real_idmap, realinode); in ovl_copyattr()
1409 inode->i_uid = vfsuid_into_kuid(vfsuid); in ovl_copyattr()
Dinode.c479 vfsuid_t vfsuid; in ovl_idmap_posix_acl() local
485 vfsuid = make_vfsuid(idmap, fs_userns, e->e_uid); in ovl_idmap_posix_acl()
486 e->e_uid = vfsuid_into_kuid(vfsuid); in ovl_idmap_posix_acl()
/linux-6.6.21/security/integrity/ima/
Dima_policy.c78 static inline bool vfsuid_gt_kuid(vfsuid_t vfsuid, kuid_t kuid) in vfsuid_gt_kuid() argument
80 return __vfsuid_val(vfsuid) > __kuid_val(kuid); in vfsuid_gt_kuid()
88 static inline bool vfsuid_lt_kuid(vfsuid_t vfsuid, kuid_t kuid) in vfsuid_lt_kuid() argument
90 return __vfsuid_val(vfsuid) < __kuid_val(kuid); in vfsuid_lt_kuid()
112 …bool (*fowner_op)(vfsuid_t vfsuid, kuid_t rule_uid); /* vfsuid_eq_kuid(), vfsuid_gt_kuid(), vfsuid…