Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762723AbYB1T4l (ORCPT ); Thu, 28 Feb 2008 14:56:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932379AbYB1TwG (ORCPT ); Thu, 28 Feb 2008 14:52:06 -0500 Received: from e2.ny.us.ibm.com ([32.97.182.142]:51959 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932366AbYB1TwC (ORCPT ); Thu, 28 Feb 2008 14:52:02 -0500 Date: Thu, 28 Feb 2008 13:51:18 -0600 From: "Serge E. Hallyn" To: Jeff Moyer Cc: Ian Kent , Andrew Morton , Kernel Mailing List , autofs mailing list , linux-fsdevel , Pavel Emelyanov , "Eric W. Biederman" Subject: Re: [PATCH 3/4] autofs4 - track uid and gid of last mount requestor Message-ID: <20080228195118.GA16634@sergelap.austin.ibm.com> References: <20080227204546.72e16e8d.akpm@linux-foundation.org> <1204179747.3501.21.camel@raven.themaw.net> <20080227223734.caab0165.akpm@linux-foundation.org> <1204182500.3501.49.camel@raven.themaw.net> <20080227232339.af6e904a.akpm@linux-foundation.org> <1204185623.3501.84.camel@raven.themaw.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2632 Lines: 58 Quoting Jeff Moyer (jmoyer@redhat.com): > Ian Kent writes: > > > On Wed, 2008-02-27 at 23:23 -0800, Andrew Morton wrote: > >> On Thu, 28 Feb 2008 16:08:20 +0900 Ian Kent wrote: > >> > which includes the process uid and gid, and as part of > >> > the lookup we set macros for several mount map substitution variables, > >> > derived from the uid and gid of the process requesting the mount and > >> > they can be used within autofs maps. > >> > >> yeah, could be a problem. Hopefully the namespace people can advise. > >> Perhaps we need a concept of an exportable-to-userspace namespace-id+uid, > >> namespace-id+gid, namespace-id+pid, etc for this sort of thing. It has > >> come up before. Recently, but I forget what the context was. > > > > I'm all ears to any feedback from others on this, please. > > I think there is some confusion surrounding what the UID and GID are > used for in this context. I'll try to explain it as best I can. > > When the automount daemon parses a map entry, it will do some amount of > variable substitution. So, let's say you're running on an i386 box, and > you want to mount a library directory from a server. You might have a > map entry that looks like this: > > lib server:/export/$ARCH/lib > > In this case, the automount daemon will replace $ARCH with i386, and > will try the following mount command: > > mount -t nfs server:/export/i386/lib /automountdir/lib > > There are cases where it would be helpful to use the requesting > process's UID in such a variable substitution. Consider the case of a > CIFS share, where the automount daemon runs as user root, but we want to > mount the share using the credentials of the requesting user. In this > case, the UID and GID can be helpful in formatting the mount options for > mounting the share. > > So, the UID and GID are used only for map substitutions. Now, having > said all of that, I'll have to look more closely at why we even need to > keep track of it, given that it only needs to be used when performing > the lookup, and at that time we have information on the requesting UID > and GID. Thanks Jeff. If that's the case then user namespaces don't affect this at all. (Still trying to follow the rest of the thread bc i definately feel like I'm missing something. I swear I understood autofs 10+ years ago :) thanks, -serge -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/