On Mon, 2013-09-02 at 12:34 +0200, Martin Wilck wrote: > On 08/19/2013 03:11 AM, Ian Kent wrote: > > There are patches from several contributors I plan on committing > > so I thought posting them to the list for final review would be > > sensible. > > I am wondering about my auto.smb patch (see > http://www.spinics.net/lists/autofs/msg00402.html). Back then, you said > > > > > All I'm really saying is that, the program map returns a string that is > > then used as the map entry, so when it is parsed the variables $UID, > > $GID, etc. will be present in the macro lookup table as ${UID} (and $UID > > etc. works) ... so maybe these same variables should be provided in the > > environment of the program. > > > > It isn't entirely clear if that is needed since those macro values may > > be returned in the map entry text with things like echo "/some/string > > \ ... ${UID} ..." etc. for later translation. > > > > Really, a revised patch depends on this question being answered first. > > Nobody has spoken up on this list saying that additional environment > variables would need to be set. I am wondering what else needs to be > done in order to merge this (IMO very useful) functionality. I like the idea of the setuid() but it's probably more convenient for me to set the standard macro variables (that are set when the entry is parsed) in the environment before running the program map. Also setuid() changes what some may expect to be the case so that's probably not a good idea. One of the current patches in the queue sets existing macro variables in the environment, in order to pass parameters to a program map, so all that would need to be done is a call to a function that adds the standard variables to the macro table for that to happen. I posted a question about the second patch and will wait for the answer to that. > > Martin > -- To unsubscribe from this list: send the line "unsubscribe autofs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html