login
Header Space

 
 

Re: [PATCH 3/4] autofs4 - track uid and gid of last mount requestor

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ian Kent <raven@...>
Cc: Andrew Morton <akpm@...>, Kernel Mailing List <linux-kernel@...>, autofs mailing list <autofs@...>, linux-fsdevel <linux-fsdevel@...>, Pavel Emelyanov <xemul@...>, Eric W. Biederman <ebiederm@...>
Date: Thursday, February 28, 2008 - 1:13 pm

Ian Kent <raven@themaw.net> writes:


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.

Cheers,

Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 3/4] autofs4 - track uid and gid of last mount re..., Eric W. Biederman, (Thu Feb 28, 4:33 pm)
Re: [autofs] [PATCH 3/4] autofs4 - track uid and gid of last..., Fabio Olive Leite, (Thu Feb 28, 8:31 am)
Re: [PATCH 3/4] autofs4 - track uid and gid of last mount re..., Jeff Moyer, (Thu Feb 28, 1:13 pm)
speck-geostationary