Skip to content

Commit f31389d

Browse files
committed
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 <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
1 parent 6c1ee03 commit f31389d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/alpha/kernel/osf_sys.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ linux_to_osf_stat(struct kstat *lstat, struct osf_stat __user *osf_stat)
278278
tmp.st_dev = lstat->dev;
279279
tmp.st_mode = lstat->mode;
280280
tmp.st_nlink = lstat->nlink;
281-
tmp.st_uid = lstat->uid;
282-
tmp.st_gid = lstat->gid;
281+
tmp.st_uid = from_kuid_munged(current_user_ns(), lstat->uid);
282+
tmp.st_gid = from_kgid_munged(current_user_ns(), lstat->gid);
283283
tmp.st_rdev = lstat->rdev;
284284
tmp.st_ldev = lstat->rdev;
285285
tmp.st_size = lstat->size;

0 commit comments

Comments
 (0)