From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422638AbWGNQzq (ORCPT ); Fri, 14 Jul 2006 12:55:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422643AbWGNQzq (ORCPT ); Fri, 14 Jul 2006 12:55:46 -0400 Received: from e1.ny.us.ibm.com ([32.97.182.141]:8156 "EHLO e1.ny.us.ibm.com") by vger.kernel.org with ESMTP id S1422638AbWGNQzp (ORCPT ); Fri, 14 Jul 2006 12:55:45 -0400 Subject: Re: [PATCH -mm 5/7] add user namespace From: Dave Hansen To: "Eric W. Biederman" Cc: "Serge E. Hallyn" , Cedric Le Goater , linux-kernel@vger.kernel.org, Andrew Morton , Kirill Korotaev , Andrey Savochkin , Herbert Poetzl , Sam Vilain In-Reply-To: References: <44B684A5.2040008@fr.ibm.com> <20060713174721.GA21399@sergelap.austin.ibm.com> <1152815391.7650.58.camel@localhost.localdomain> <1152821011.24925.7.camel@localhost.localdomain> <1152887287.24925.22.camel@localhost.localdomain> <20060714162935.GA25303@sergelap.austin.ibm.com> Content-Type: text/plain Date: Fri, 14 Jul 2006 09:55:38 -0700 Message-Id: <1152896138.24925.74.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2006-07-14 at 10:49 -0600, Eric W. Biederman wrote: > - if (current->fsuid == inode->i_uid) > + if ((current->fsuid == inode->i_uid) && > + (current->nsproxy->user_ns == inode->i_sb->user_ns)) > mode >>= 6; I really don't think assigning a user namespace to a superblock is the right way to go. Seems to me like the _view_ into the filesystem is what you want to modify. That would seem to me to mean that each 'struct namespace' (filesystem namespace) or vfsmount would be assigned a corresponding user namespace, *not* the superblock. -- Dave