summaryrefslogtreecommitdiffstats
path: root/arch/parisc/hpux
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-02-09 18:10:30 +0100
committerEric W. Biederman <ebiederm@xmission.com>2012-05-15 23:08:35 +0200
commita7c1938e22c02b008655524c766d185ae99d9d53 (patch)
treef6b862a5d187908007614e5537f4cd1e31a40df4 /arch/parisc/hpux
parentuserns: Convert user specfied uids and gids in chown into kuids and kgid (diff)
downloadlinux-a7c1938e22c02b008655524c766d185ae99d9d53.tar.xz
linux-a7c1938e22c02b008655524c766d185ae99d9d53.zip
userns: Convert stat to return values mapped from kuids and kgids
- Store uids and gids with kuid_t and kgid_t in struct kstat - Convert uid and gids to userspace usable values with from_kuid and from_kgid Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'arch/parisc/hpux')
-rw-r--r--arch/parisc/hpux/fs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
index 0dc8543acb4f..c71eb6c79897 100644
--- a/arch/parisc/hpux/fs.c
+++ b/arch/parisc/hpux/fs.c
@@ -159,8 +159,8 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 __user *statbuf)
tmp.st_ino = stat->ino;
tmp.st_mode = stat->mode;
tmp.st_nlink = stat->nlink;
- tmp.st_uid = stat->uid;
- tmp.st_gid = stat->gid;
+ tmp.st_uid = from_kuid_munged(current_user_ns(), stat->uid);
+ tmp.st_gid = from_kgid_munged(current_user_ns(), stat->gid);
tmp.st_rdev = new_encode_dev(stat->rdev);
tmp.st_size = stat->size;
tmp.st_atime = stat->atime.tv_sec;