Re: [rfc] fcntl: Add F_GETOWNER_UIDS option

From: Cyrill Gorcunov
Date: Tue Mar 27 2012 - 18:34:21 EST


On Tue, Mar 27, 2012 at 10:29:23PM +0000, Serge E. Hallyn wrote:
> Quoting Cyrill Gorcunov (gorcunov@xxxxxxxxxx):
> > On Tue, Mar 27, 2012 at 05:25:34PM +0200, Oleg Nesterov wrote:
> > > user_ns_map_uid() should translate uid_t from one namespace to another,
> > > in this case the namespace is the same.
> > >
> > > user_ns_map_uid(cred->user_ns, cred) must be the identical mapping,
> > > no matter how we change the implementation.
> > >
> > > What I think you need is
> > > user_ns_map_uid(current_user_ns(), filp->f_owner.cred), the only
> > > problem is that f_owner.cred doesn't exist.
> > >
> >
> > Hmm, I was confused by likely() in user_ns_map_uid. But indeed, I think
> > you're so right. Is there some reason why we can't carry f_owner.cred
> > pointer?
>
> We would need that for this, yes. However, Eric is working on a new
> patchset which changes the cross-userns uid mappings. I think it's
> worth simply leaving a comment that this will need to be addressed,
> and leave in the unconverted uid.

Hi Serge, thanks for info. But if it will be unconverted uid, can't
be there some security problem with that which I missed?

Cyrill
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/