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/sparc | |
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/sparc')
-rw-r--r-- | arch/sparc/kernel/sys_sparc32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c index 29c478ffed91..f7392336961f 100644 --- a/arch/sparc/kernel/sys_sparc32.c +++ b/arch/sparc/kernel/sys_sparc32.c | |||
@@ -139,8 +139,8 @@ static int cp_compat_stat64(struct kstat *stat, | |||
139 | err |= put_user(stat->ino, &statbuf->st_ino); | 139 | err |= put_user(stat->ino, &statbuf->st_ino); |
140 | err |= put_user(stat->mode, &statbuf->st_mode); | 140 | err |= put_user(stat->mode, &statbuf->st_mode); |
141 | err |= put_user(stat->nlink, &statbuf->st_nlink); | 141 | err |= put_user(stat->nlink, &statbuf->st_nlink); |
142 | err |= put_user(stat->uid, &statbuf->st_uid); | 142 | err |= put_user(from_kuid_munged(current_user_ns(), stat->uid), &statbuf->st_uid); |
143 | err |= put_user(stat->gid, &statbuf->st_gid); | 143 | err |= put_user(from_kgid_munged(current_user_ns(), stat->gid), &statbuf->st_gid); |
144 | err |= put_user(huge_encode_dev(stat->rdev), &statbuf->st_rdev); | 144 | err |= put_user(huge_encode_dev(stat->rdev), &statbuf->st_rdev); |
145 | err |= put_user(0, (unsigned long __user *) &statbuf->__pad3[0]); | 145 | err |= put_user(0, (unsigned long __user *) &statbuf->__pad3[0]); |
146 | err |= put_user(stat->size, &statbuf->st_size); | 146 | err |= put_user(stat->size, &statbuf->st_size); |