Home
last modified time | relevance | path

Searched refs:kuid (Results 1 – 22 of 22) sorted by relevance

/linux-6.6.21/fs/
Dmnt_idmapping.c98 kuid_t kuid) in make_vfsuid() argument
104 return VFSUIDT_INIT(kuid); in make_vfsuid()
106 uid = __kuid_val(kuid); in make_vfsuid()
108 uid = from_kuid(fs_userns, kuid); in make_vfsuid()
Dopen.c724 static inline bool setattr_vfsuid(struct iattr *attr, kuid_t kuid) in setattr_vfsuid() argument
726 if (!uid_valid(kuid)) in setattr_vfsuid()
729 attr->ia_vfsuid = VFSUIDT_INIT(kuid); in setattr_vfsuid()
/linux-6.6.21/include/linux/
Dsysfs.h345 int sysfs_file_change_owner(struct kobject *kobj, const char *name, kuid_t kuid,
347 int sysfs_change_owner(struct kobject *kobj, kuid_t kuid, kgid_t kgid);
349 const char *name, kuid_t kuid, kgid_t kgid);
352 kuid_t kuid, kgid_t kgid);
354 const struct attribute_group *groups, kuid_t kuid,
574 const char *name, kuid_t kuid, in sysfs_file_change_owner() argument
582 const char *name, kuid_t kuid, in sysfs_link_change_owner() argument
588 static inline int sysfs_change_owner(struct kobject *kobj, kuid_t kuid, kgid_t kgid) in sysfs_change_owner() argument
595 kuid_t kuid, kgid_t kgid) in sysfs_groups_change_owner() argument
602 kuid_t kuid, kgid_t kgid) in sysfs_group_change_owner() argument
Duidgid.h153 static inline uid_t from_kuid(struct user_namespace *to, kuid_t kuid) in from_kuid() argument
155 return __kuid_val(kuid); in from_kuid()
163 static inline uid_t from_kuid_munged(struct user_namespace *to, kuid_t kuid) in from_kuid_munged() argument
165 uid_t uid = from_kuid(to, kuid); in from_kuid_munged()
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()
119 struct user_namespace *fs_userns, kuid_t kuid);
Dfs.h1500 kuid_t kuid; in fsuidgid_has_mapping() local
1503 kuid = mapped_fsuid(idmap, fs_userns); in fsuidgid_has_mapping()
1504 if (!uid_valid(kuid)) in fsuidgid_has_mapping()
1509 return kuid_has_mapping(fs_userns, kuid) && in fsuidgid_has_mapping()
Ddevice.h1075 int device_change_owner(struct device *dev, kuid_t kuid, kgid_t kgid);
/linux-6.6.21/drivers/base/power/
Dsysfs.c512 static inline int dpm_sysfs_wakeup_change_owner(struct device *dev, kuid_t kuid, in dpm_sysfs_wakeup_change_owner() argument
516 return device_change_owner(dev->power.wakeup->dev, kuid, kgid); in dpm_sysfs_wakeup_change_owner()
545 static inline int dpm_sysfs_wakeup_change_owner(struct device *dev, kuid_t kuid, in dpm_sysfs_wakeup_change_owner() argument
738 int dpm_sysfs_change_owner(struct device *dev, kuid_t kuid, kgid_t kgid) in dpm_sysfs_change_owner() argument
745 rc = sysfs_group_change_owner(&dev->kobj, &pm_attr_group, kuid, kgid); in dpm_sysfs_change_owner()
751 &dev->kobj, &pm_runtime_attr_group, kuid, kgid); in dpm_sysfs_change_owner()
758 kuid, kgid); in dpm_sysfs_change_owner()
762 rc = dpm_sysfs_wakeup_change_owner(dev, kuid, kgid); in dpm_sysfs_change_owner()
769 &dev->kobj, &pm_qos_latency_tolerance_attr_group, kuid, in dpm_sysfs_change_owner()
Dpower.h81 extern int dpm_sysfs_change_owner(struct device *dev, kuid_t kuid, kgid_t kgid);
96 static inline int dpm_sysfs_change_owner(struct device *dev, kuid_t kuid, in dpm_sysfs_change_owner() argument
/linux-6.6.21/fs/sysfs/
Dfile.c585 static int internal_change_owner(struct kernfs_node *kn, kuid_t kuid, in internal_change_owner() argument
590 .ia_uid = kuid, in internal_change_owner()
611 const char *name, kuid_t kuid, kgid_t kgid) in sysfs_link_change_owner() argument
630 error = internal_change_owner(kn, kuid, kgid); in sysfs_link_change_owner()
649 int sysfs_file_change_owner(struct kobject *kobj, const char *name, kuid_t kuid, in sysfs_file_change_owner() argument
665 error = internal_change_owner(kn, kuid, kgid); in sysfs_file_change_owner()
691 int sysfs_change_owner(struct kobject *kobj, kuid_t kuid, kgid_t kgid) in sysfs_change_owner() argument
700 error = internal_change_owner(kobj->sd, kuid, kgid); in sysfs_change_owner()
711 kuid, kgid); in sysfs_change_owner()
Dgroup.c521 const struct attribute_group *grp, kuid_t kuid, in sysfs_group_change_owner() argument
528 .ia_uid = kuid, in sysfs_group_change_owner()
565 kuid_t kuid, kgid_t kgid) in sysfs_groups_change_owner() argument
576 error = sysfs_group_change_owner(kobj, groups[i], kuid, kgid); in sysfs_groups_change_owner()
/linux-6.6.21/net/core/
Dnet-sysfs.c1112 static int rx_queue_change_owner(struct net_device *dev, int index, kuid_t kuid, in rx_queue_change_owner() argument
1119 error = sysfs_change_owner(kobj, kuid, kgid); in rx_queue_change_owner()
1125 kobj, dev->sysfs_rx_queue_group, kuid, kgid); in rx_queue_change_owner()
1167 kuid_t kuid, kgid_t kgid) in net_rx_queue_change_owner() argument
1178 error = rx_queue_change_owner(dev, i, kuid, kgid); in net_rx_queue_change_owner()
1715 kuid_t kuid, kgid_t kgid) in tx_queue_change_owner() argument
1721 error = sysfs_change_owner(kobj, kuid, kgid); in tx_queue_change_owner()
1726 error = sysfs_group_change_owner(kobj, &dql_group, kuid, kgid); in tx_queue_change_owner()
1772 kuid_t kuid, kgid_t kgid) in net_tx_queue_change_owner() argument
1779 error = tx_queue_change_owner(dev, i, kuid, kgid); in net_tx_queue_change_owner()
[all …]
Dfilter.c5122 kuid_t kuid; in BPF_CALL_1() local
5126 kuid = sock_net_uid(sock_net(sk), sk); in BPF_CALL_1()
5127 return from_kuid_munged(sock_net(sk)->user_ns, kuid); in BPF_CALL_1()
/linux-6.6.21/kernel/
Dsys.c616 kuid_t kuid; in __sys_setuid() local
618 kuid = make_kuid(ns, uid); in __sys_setuid()
619 if (!uid_valid(kuid)) in __sys_setuid()
629 new->suid = new->uid = kuid; in __sys_setuid()
630 if (!uid_eq(kuid, old->uid)) { in __sys_setuid()
635 } else if (!uid_eq(kuid, old->uid) && !uid_eq(kuid, new->suid)) { in __sys_setuid()
639 new->fsuid = new->euid = kuid; in __sys_setuid()
868 kuid_t kuid; in __sys_setfsuid() local
873 kuid = make_kuid(old->user_ns, uid); in __sys_setfsuid()
874 if (!uid_valid(kuid)) in __sys_setfsuid()
[all …]
Duser_namespace.c427 uid_t from_kuid(struct user_namespace *targ, kuid_t kuid) in from_kuid() argument
430 return map_id_up(&targ->uid_map, __kuid_val(kuid)); in from_kuid()
452 uid_t from_kuid_munged(struct user_namespace *targ, kuid_t kuid) in from_kuid_munged() argument
455 uid = from_kuid(targ, kuid); in from_kuid_munged()
/linux-6.6.21/fs/xfs/
Dxfs_quota.h119 xfs_qm_vop_dqalloc(struct xfs_inode *ip, kuid_t kuid, kgid_t kgid, in xfs_qm_vop_dqalloc() argument
/linux-6.6.21/drivers/base/
Dcore.c4609 static int device_attrs_change_owner(struct device *dev, kuid_t kuid, in device_attrs_change_owner() argument
4622 error = sysfs_groups_change_owner(kobj, class->dev_groups, kuid, in device_attrs_change_owner()
4633 error = sysfs_groups_change_owner(kobj, type->groups, kuid, in device_attrs_change_owner()
4640 error = sysfs_groups_change_owner(kobj, dev->groups, kuid, kgid); in device_attrs_change_owner()
4647 kuid, kgid); in device_attrs_change_owner()
4667 int device_change_owner(struct device *dev, kuid_t kuid, kgid_t kgid) in device_change_owner() argument
4681 error = sysfs_change_owner(kobj, kuid, kgid); in device_change_owner()
4690 error = sysfs_file_change_owner(kobj, dev_attr_uevent.attr.name, kuid, in device_change_owner()
4700 error = device_attrs_change_owner(dev, kuid, kgid); in device_change_owner()
4704 error = dpm_sysfs_change_owner(dev, kuid, kgid); in device_change_owner()
[all …]
/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()
/linux-6.6.21/mm/
Dshmem.c3907 kuid_t kuid; in shmem_parse_one() local
3944 kuid = make_kuid(current_user_ns(), result.uint_32); in shmem_parse_one()
3945 if (!uid_valid(kuid)) in shmem_parse_one()
3952 if (!kuid_has_mapping(fc->user_ns, kuid)) in shmem_parse_one()
3955 ctx->uid = kuid; in shmem_parse_one()
/linux-6.6.21/Documentation/filesystems/
Didmappings.rst339 from_kuid(idmapping, kuid)
713 make_kuid(mount, uid) = kuid
725 make_kuid(filesystem, uid) = kuid
/linux-6.6.21/fs/quota/
Ddquot.c2118 kuid_t kuid = from_vfsuid(idmap, i_user_ns(inode), in dquot_transfer() local
2121 dquot = dqget(sb, make_kqid_uid(kuid)); in dquot_transfer()
/linux-6.6.21/fs/nfsd/
Dnfs4xdr.c684 kuid_t kuid = make_kuid(userns, uid); in nfsd4_decode_authsys_parms() local
686 if (uid_valid(kuid) && gid_valid(kgid)) { in nfsd4_decode_authsys_parms()
687 cbs->uid = kuid; in nfsd4_decode_authsys_parms()