Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327278
b: refs/heads/master
c: a0eb3a0
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman committed Sep 21, 2012
1 parent 60f0844 commit e622f5b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 91fa2ccaa87368314527ea7518c545063662d67f
refs/heads/master: a0eb3a05a8cbe9cd1a41dde3d1b2e5bcc10634f2
16 changes: 11 additions & 5 deletions trunk/fs/hugetlbfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ static const struct inode_operations hugetlbfs_dir_inode_operations;
static const struct inode_operations hugetlbfs_inode_operations;

struct hugetlbfs_config {
uid_t uid;
gid_t gid;
kuid_t uid;
kgid_t gid;
umode_t mode;
long nr_blocks;
long nr_inodes;
Expand Down Expand Up @@ -785,13 +785,17 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig)
case Opt_uid:
if (match_int(&args[0], &option))
goto bad_val;
pconfig->uid = option;
pconfig->uid = make_kuid(current_user_ns(), option);
if (!uid_valid(pconfig->uid))
goto bad_val;
break;

case Opt_gid:
if (match_int(&args[0], &option))
goto bad_val;
pconfig->gid = option;
pconfig->gid = make_kgid(current_user_ns(), option);
if (!gid_valid(pconfig->gid))
goto bad_val;
break;

case Opt_mode:
Expand Down Expand Up @@ -924,7 +928,9 @@ static struct vfsmount *hugetlbfs_vfsmount;

static int can_do_hugetlb_shm(void)
{
return capable(CAP_IPC_LOCK) || in_group_p(sysctl_hugetlb_shm_group);
kgid_t shm_group;
shm_group = make_kgid(&init_user_ns, sysctl_hugetlb_shm_group);
return capable(CAP_IPC_LOCK) || in_group_p(shm_group);
}

struct file *hugetlb_file_setup(const char *name, unsigned long addr,
Expand Down
1 change: 0 additions & 1 deletion trunk/init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,6 @@ config UIDGID_CONVERTED
depends on HFS_FS = n
depends on HFSPLUS_FS = n
depends on HPFS_FS = n
depends on HUGETLBFS = n
depends on ISO9660_FS = n
depends on JFFS2_FS = n
depends on JFS_FS = n
Expand Down

0 comments on commit e622f5b

Please sign in to comment.