From: "Serge E. Hallyn" Subject: Re: [patch 0/8] unprivileged mount syscall Date: Wed, 11 Apr 2007 15:57:46 -0500 Message-ID: <20070411205746.GA17487@sergelap.austin.ibm.com> References: <20070404183012.429274832@szeredi.hu> <20070409185737.GB20226@sergelap.austin.ibm.com> <20070409205506.GC20226@sergelap.austin.ibm.com> <20070411200545.GA12115@sergelap.austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, util-linux-ng@vger.kernel.org To: Miklos Szeredi Return-path: Received: from e32.co.us.ibm.com ([32.97.110.150]:41413 "EHLO e32.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030325AbXDKU5s (ORCPT ); Wed, 11 Apr 2007 16:57:48 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Quoting Miklos Szeredi (miklos@szeredi.hu): > > Not objecting to prctl(), but two other options would be > > > > 1. add a CLONE_NEW_NS_USERMNT flag - kind of ugly, but that is > > the time at which the ns is created, so in that sense it > > makes sense. > > Yes, I thought about this, but there's no easy way to set the flag for > the initial namespace, and a second flag CLONE_NEW_NS_NOUSERMNT would > be needed to turn off the flag. Not mentioning it would 'turn it off' for the cloned ns, but the default value for the initial namespace is still a problem. > > 2. use the nsproxy container subsystem (see Paul Menage's > > containers patchset) to set this using, e.g., > > > > echo 1 > /containers/vserver1/mounts/usermount > > That again would lose some flexibility: only namespaces which > are part of a container could be manipulated. In the nsproxy subsystem, every namespace gets a container so long as the nsproxy subsystem is mounted. > Does that exclude the > initial namespace? No, the initial namespace is tied to the root dentry - so if as my example was assuming youve done mount -t container -o ns none /containers then to change the setting for the initial namespace you would echo 0 > /containers/mounts/usermount > Also how would a process find out which vserver it is running in? cat /proc/$$/container -serge