/openbmc/linux/kernel/ |
H A D | uid16.c | 120 kgid_t kgid; in groups16_to_user() local 123 kgid = group_info->gid[i]; in groups16_to_user() 124 group = high2lowgid(from_kgid_munged(user_ns, kgid)); in groups16_to_user() 138 kgid_t kgid; in groups16_from_user() local 144 kgid = make_kgid(user_ns, low2highgid(group)); in groups16_from_user() 145 if (!gid_valid(kgid)) in groups16_from_user() 148 group_info->gid[i] = kgid; in groups16_from_user()
|
H A D | groups.c | 63 kgid_t kgid; in groups_from_user() local 67 kgid = make_kgid(user_ns, gid); in groups_from_user() 68 if (!gid_valid(kgid)) in groups_from_user() 71 group_info->gid[i] = kgid; in groups_from_user()
|
H A D | sys.c | 444 kgid_t kgid; in __sys_setgid() local 446 kgid = make_kgid(ns, gid); in __sys_setgid() 447 if (!gid_valid(kgid)) in __sys_setgid() 457 new->gid = new->egid = new->sgid = new->fsgid = kgid; in __sys_setgid() 458 else if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->sgid)) in __sys_setgid() 459 new->egid = new->fsgid = kgid; in __sys_setgid() 912 kgid_t kgid; in __sys_setfsgid() local 917 kgid = make_kgid(old->user_ns, gid); in __sys_setfsgid() 918 if (!gid_valid(kgid)) in __sys_setfsgid() 925 if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->egid) || in __sys_setfsgid() [all …]
|
H A D | user_namespace.c | 495 gid_t from_kgid(struct user_namespace *targ, kgid_t kgid) in from_kgid() argument 498 return map_id_up(&targ->gid_map, __kgid_val(kgid)); in from_kgid() 519 gid_t from_kgid_munged(struct user_namespace *targ, kgid_t kgid) in from_kgid_munged() argument 522 gid = from_kgid(targ, kgid); in from_kgid_munged()
|
/openbmc/linux/include/linux/ |
H A D | sysfs.h | 346 kgid_t kgid); 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); 355 kgid_t kgid); 575 kgid_t kgid) in sysfs_file_change_owner() argument 583 kgid_t kgid) 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
|
H A D | uidgid.h | 158 static inline gid_t from_kgid(struct user_namespace *to, kgid_t kgid) in from_kgid() argument 160 return __kgid_val(kgid); in from_kgid() 171 static inline gid_t from_kgid_munged(struct user_namespace *to, kgid_t kgid) in from_kgid_munged() argument 173 gid_t gid = from_kgid(to, kgid); in from_kgid_munged()
|
H A D | mnt_idmapping.h | 94 static inline bool vfsgid_eq_kgid(vfsgid_t vfsgid, kgid_t kgid) in vfsgid_eq_kgid() argument 96 return vfsgid_valid(vfsgid) && __vfsgid_val(vfsgid) == __kgid_val(kgid); in vfsgid_eq_kgid() 122 struct user_namespace *fs_userns, kgid_t kgid);
|
H A D | fs.h | 1502 kgid_t kgid; in fsuidgid_has_mapping() local 1507 kgid = mapped_fsgid(idmap, fs_userns); in fsuidgid_has_mapping() 1508 if (!gid_valid(kgid)) in fsuidgid_has_mapping() 1511 kgid_has_mapping(fs_userns, kgid); in fsuidgid_has_mapping()
|
H A D | device.h | 1078 int device_change_owner(struct device *dev, kuid_t kuid, kgid_t kgid);
|
/openbmc/linux/fs/ |
H A D | mnt_idmapping.c | 136 struct user_namespace *fs_userns, kgid_t kgid) in make_vfsgid() argument 142 return VFSGIDT_INIT(kgid); in make_vfsgid() 144 gid = __kgid_val(kgid); in make_vfsgid() 146 gid = from_kgid(fs_userns, kgid); in make_vfsgid()
|
H A D | open.c | 739 static inline bool setattr_vfsgid(struct iattr *attr, kgid_t kgid) in setattr_vfsgid() argument 741 if (!gid_valid(kgid)) in setattr_vfsgid() 744 attr->ia_vfsgid = VFSGIDT_INIT(kgid); in setattr_vfsgid()
|
/openbmc/linux/fs/sysfs/ |
H A D | file.c | 588 kgid_t kgid) in internal_change_owner() argument 593 .ia_gid = kgid, in internal_change_owner() 613 const char *name, kuid_t kuid, kgid_t kgid) in sysfs_link_change_owner() argument 632 error = internal_change_owner(kn, kuid, kgid); in sysfs_link_change_owner() 652 kgid_t kgid) in sysfs_file_change_owner() argument 667 error = internal_change_owner(kn, kuid, kgid); in sysfs_file_change_owner() 693 int sysfs_change_owner(struct kobject *kobj, kuid_t kuid, kgid_t kgid) in sysfs_change_owner() argument 702 error = internal_change_owner(kobj->sd, kuid, kgid); in sysfs_change_owner() 713 kuid, kgid); in sysfs_change_owner()
|
H A D | group.c | 522 kgid_t kgid) in sysfs_group_change_owner() argument 529 .ia_gid = kgid, 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()
|
/openbmc/linux/drivers/base/power/ |
H A D | sysfs.c | 513 kgid_t kgid) in dpm_sysfs_wakeup_change_owner() argument 516 return device_change_owner(dev->power.wakeup->dev, kuid, kgid); in dpm_sysfs_wakeup_change_owner() 546 kgid_t kgid) 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() 770 kgid); in dpm_sysfs_change_owner()
|
H A D | power.h | 81 extern int dpm_sysfs_change_owner(struct device *dev, kuid_t kuid, kgid_t kgid); 97 kgid_t kgid) { return 0; } in dpm_sysfs_change_owner() argument
|
/openbmc/linux/net/core/ |
H A D | net-sysfs.c | 1111 kgid_t kgid) in rx_queue_change_owner() argument 1117 error = sysfs_change_owner(kobj, kuid, kgid); in rx_queue_change_owner() 1123 kobj, dev->sysfs_rx_queue_group, kuid, kgid); in rx_queue_change_owner() 1165 kuid_t kuid, kgid_t kgid) in net_rx_queue_change_owner() argument 1176 error = rx_queue_change_owner(dev, i, kuid, kgid); in net_rx_queue_change_owner() 1713 kuid_t kuid, kgid_t kgid) in tx_queue_change_owner() argument 1719 error = sysfs_change_owner(kobj, kuid, kgid); in tx_queue_change_owner() 1724 error = sysfs_group_change_owner(kobj, &dql_group, kuid, kgid); in tx_queue_change_owner() 1770 kuid_t kuid, kgid_t kgid) in net_tx_queue_change_owner() argument 1777 error = tx_queue_change_owner(dev, i, kuid, kgid); in net_tx_queue_change_owner() [all …]
|
/openbmc/linux/net/sunrpc/ |
H A D | svcauth_unix.c | 524 kgid_t kgid; in unix_gid_parse() local 529 kgid = make_kgid(current_user_ns(), gid); in unix_gid_parse() 530 if (!gid_valid(kgid)) in unix_gid_parse() 532 ug.gi->gid[i] = kgid; in unix_gid_parse() 966 kgid_t kgid = make_kgid(userns, be32_to_cpup(p++)); in svcauth_unix_accept() local 967 cred->cr_group_info->gid[i] = kgid; in svcauth_unix_accept()
|
/openbmc/linux/net/sunrpc/auth_gss/ |
H A D | gss_rpc_xdr.c | 211 kgid_t kgid; in gssx_dec_linux_creds() local 216 kgid = make_kgid(&init_user_ns, tmp); in gssx_dec_linux_creds() 217 if (!gid_valid(kgid)) in gssx_dec_linux_creds() 219 creds->cr_group_info->gid[i] = kgid; in gssx_dec_linux_creds()
|
H A D | svcauth_gss.c | 533 kgid_t kgid; in rsc_parse() local 536 kgid = make_kgid(current_user_ns(), id); in rsc_parse() 537 if (!gid_valid(kgid)) in rsc_parse() 539 rsci.cred.cr_group_info->gid[i] = kgid; in rsc_parse()
|
/openbmc/linux/fs/xfs/ |
H A D | xfs_quota.h | 119 xfs_qm_vop_dqalloc(struct xfs_inode *ip, kuid_t kuid, kgid_t kgid, in xfs_qm_vop_dqalloc() argument
|
/openbmc/linux/drivers/base/ |
H A D | core.c | 4680 kgid_t kgid) in device_attrs_change_owner() argument 4693 kgid); in device_attrs_change_owner() 4704 kgid); in device_attrs_change_owner() 4710 error = sysfs_groups_change_owner(kobj, dev->groups, kuid, kgid); in device_attrs_change_owner() 4717 kuid, kgid); in device_attrs_change_owner() 4737 int device_change_owner(struct device *dev, kuid_t kuid, kgid_t kgid) in device_change_owner() argument 4751 error = sysfs_change_owner(kobj, kuid, kgid); in device_change_owner() 4761 kgid); in device_change_owner() 4770 error = device_attrs_change_owner(dev, kuid, kgid); in device_change_owner() 4774 error = dpm_sysfs_change_owner(dev, kuid, kgid); in device_change_owner() [all …]
|
/openbmc/linux/fs/fuse/ |
H A D | inode.c | 755 kgid_t kgid; in fuse_parse_param() local 814 kgid = make_kgid(fsc->user_ns, result.uint_32);; in fuse_parse_param() 815 if (!gid_valid(kgid)) in fuse_parse_param() 821 if (!kgid_has_mapping(fsc->user_ns, kgid)) in fuse_parse_param() 823 ctx->group_id = kgid; in fuse_parse_param()
|
H A D | dir.c | 553 kgid_t kgid = dir->i_gid; in get_create_supp_group() local 554 gid_t parent_gid = from_kgid(fc->user_ns, kgid); in get_create_supp_group() 557 if (parent_gid == (gid_t) -1 || gid_eq(kgid, current_fsgid()) || in get_create_supp_group() 558 !in_group_p(kgid)) in get_create_supp_group()
|
/openbmc/linux/security/integrity/ima/ |
H A D | ima_policy.c | 83 static inline bool vfsgid_gt_kgid(vfsgid_t vfsgid, kgid_t kgid) in vfsgid_gt_kgid() argument 85 return __vfsgid_val(vfsgid) > __kgid_val(kgid); in vfsgid_gt_kgid() 93 static inline bool vfsgid_lt_kgid(vfsgid_t vfsgid, kgid_t kgid) in vfsgid_lt_kgid() argument 95 return __vfsgid_val(vfsgid) < __kgid_val(kgid); in vfsgid_lt_kgid()
|
/openbmc/linux/mm/ |
H A D | shmem.c | 3910 kgid_t kgid; in shmem_parse_one() local 3960 kgid = make_kgid(current_user_ns(), result.uint_32); in shmem_parse_one() 3961 if (!gid_valid(kgid)) in shmem_parse_one() 3968 if (!kgid_has_mapping(fc->user_ns, kgid)) in shmem_parse_one() 3971 ctx->gid = kgid; in shmem_parse_one()
|