lkml.org 
[lkml]   [2020]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 19/28] stat: handle fsid mappings
On Fri, Feb 14, 2020 at 12:03:14PM -0700, Tycho Andersen wrote:
> On Fri, Feb 14, 2020 at 07:35:45PM +0100, Christian Brauner wrote:
> > @@ -471,8 +484,13 @@ static long cp_new_stat64(struct kstat *stat, struct stat64 __user *statbuf)
> > #endif
> > tmp.st_mode = stat->mode;
> > tmp.st_nlink = stat->nlink;
> > - tmp.st_uid = from_kuid_munged(current_user_ns(), stat->uid);
> > - tmp.st_gid = from_kgid_munged(current_user_ns(), stat->gid);
> > + if (stat->userns_visible) {
> > + tmp.st_uid, from_kuid_munged(current_user_ns(), stat->uid);
> > + tmp.st_gid, from_kgid_munged(current_user_ns(), stat->gid);
> > + } else {
> > + tmp.st_uid, from_kfsuid_munged(current_user_ns(), stat->uid);
> > + tmp.st_gid, from_kfsgid_munged(current_user_ns(), stat->gid);
> > + }
>
> I suppose this should be = ?

Good catch. I thought I had eliminated all those by doing automated
conversion but apparently not. :)

Christian

\
 
 \ /
  Last update: 2020-02-16 15:13    [W:0.059 / U:5.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site