diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-02-09 12:10:30 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-05-15 17:08:35 -0400 |
commit | a7c1938e22c02b008655524c766d185ae99d9d53 (patch) | |
tree | f6b862a5d187908007614e5537f4cd1e31a40df4 /arch/s390 | |
parent | 52137abe1820196d956bfd51edebc571b3427deb (diff) |
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/s390')
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index f0273ed760ef..65426525d9f2 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -547,8 +547,8 @@ static int cp_stat64(struct stat64_emu31 __user *ubuf, struct kstat *stat) | |||
547 | tmp.__st_ino = (u32)stat->ino; | 547 | tmp.__st_ino = (u32)stat->ino; |
548 | tmp.st_mode = stat->mode; | 548 | tmp.st_mode = stat->mode; |
549 | tmp.st_nlink = (unsigned int)stat->nlink; | 549 | tmp.st_nlink = (unsigned int)stat->nlink; |
550 | tmp.st_uid = stat->uid; | 550 | tmp.st_uid = from_kuid_munged(current_user_ns(), stat->uid); |
551 | tmp.st_gid = stat->gid; | 551 | tmp.st_gid = from_kgid_munged(current_user_ns(), stat->gid); |
552 | tmp.st_rdev = huge_encode_dev(stat->rdev); | 552 | tmp.st_rdev = huge_encode_dev(stat->rdev); |
553 | tmp.st_size = stat->size; | 553 | tmp.st_size = stat->size; |
554 | tmp.st_blksize = (u32)stat->blksize; | 554 | tmp.st_blksize = (u32)stat->blksize; |