xfs
[Top] [All Lists]

Re: [PATCH v7 7/7] enable building user namespace with xfs

To: Ben Myers <bpm@xxxxxxx>
Subject: Re: [PATCH v7 7/7] enable building user namespace with xfs
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 31 Jul 2013 10:21:19 +1000
Cc: Dwight Engen <dwight.engen@xxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20130730234021.GR3111@xxxxxxx>
References: <20130729230709.11033b2d@xxxxxxxxxx> <20130730234021.GR3111@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Jul 30, 2013 at 06:40:21PM -0500, Ben Myers wrote:
> Hey Dwight,
> 
> On Mon, Jul 29, 2013 at 11:07:09PM -0400, Dwight Engen wrote:
> > >From e6a9ee0cfa0ed40484f66bc1726dc19de36038b8 Mon Sep 17 00:00:00 2001
> > From: Dwight Engen <dwight.engen@xxxxxxxxxx>
> > Date: Tue, 2 Jul 2013 09:52:54 -0400
> > Subject: [PATCH 7/7] enable building user namespace with xfs
> > 
> > Signed-off-by: Dwight Engen <dwight.engen@xxxxxxxxxx>
> 
> Was there a patch running around to limit bulkstat to init_user_ns?  Any other
> items that needed to be addressed before applying this patch?

Bulkstat has a capable(CAP_SYS_ADMIN) check and therefore can only be
executed in the init name space. Similarly, all the open-by-handle
interfaces have the same capable() checks so they can only be
executed int he init name space, too.

The only thing I think we still need to address is whether
xfs_ioc_setattr() should allow users within a namespace to change
the project ID of a file they otherwise own. That function is
currently changed to use a inode_owner_or_capable() check and so if
the uids match inside the namespace the modification is allowed.

However, right now for project IDs I think we have decided to limit
manipulations to the init user namespace and not expose project IDs
inside user namespaces at all. Hence I think that xfs_ioc_setattr()
needs a further check for this...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>