From: Eric W. Biederman Date: Sat, 11 Aug 2012 19:07:24 +0000 (-0700) Subject: userns: On alpha modify linux_to_osf_stat to use convert from kuids and kgids X-Git-Tag: v3.7-rc1~147^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f31389d50817c9a99c3ea81fbb2e3789e303cfe8;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git userns: On alpha modify linux_to_osf_stat to use convert from kuids and kgids Silencing build errors and potentially allowing people to use osf system calls in from processes running in a non-default user namespace. It seems this stat call was missed in my first round of converting the stat system calls, bother. Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Signed-off-by: "Eric W. Biederman" --- diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 98a1036..32c5f9d 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -278,8 +278,8 @@ linux_to_osf_stat(struct kstat *lstat, struct osf_stat __user *osf_stat) tmp.st_dev = lstat->dev; tmp.st_mode = lstat->mode; tmp.st_nlink = lstat->nlink; - tmp.st_uid = lstat->uid; - tmp.st_gid = lstat->gid; + tmp.st_uid = from_kuid_munged(current_user_ns(), lstat->uid); + tmp.st_gid = from_kgid_munged(current_user_ns(), lstat->gid); tmp.st_rdev = lstat->rdev; tmp.st_ldev = lstat->rdev; tmp.st_size = lstat->size;