On Tue, 2007-11-27 at 16:13 +0100, muzzol wrote: > 2007/11/27, Ian Kent <[EMAIL PROTECTED]>: > > I have no idea what you are talking about here. > > > > sorry for not being clear. > > - im using version 5.0.2 > - i want an executable map that asks some info to user. > - i take auto.smb as base and add something like this: > > opts="-fstype=cifs,credentials=$CREDENTIALS" > > USERSESSION=`w | grep "x-session-manager"` > USER=`echo "$UXSESSION" | cut -d" " -f1` > DISPLAY=`echo "$UXSESSION" | tr -s " " | cut -d" " -f2` > CREDENTIALS="/home/$USER/.smb.auth.$key" > > if [ ! -e "$CREDENTIALS" ]; then > NEWKEY=`zenity --entry --hide-text --text="Enter your pass for $key"` > echo -e "username=$USER\npassword=$NEWKEY" > "$CREDENTIALS" > fi > > [...] > > this works as long as there's only one user on the machine and is > pretty limited. if user variables were exposed to executable maps it > could be easily integrated with Zenity, DBUS, xmessage, or any other > user space process.
I think this is where the problem is. Expose what user variables? The ones of the user process requesting the mount? They are present in the user process not the automount process and basically aren't known to automount. This is the fundamental problem with adding this feature. One suggestion is to actually decouple the mount request from automount and run a program from the kernel within requesting user context but then you can't mount because you're not root and executing a program from the kernel is bad news as far as I'm concerned. You just can't get return status. > > > > The USER macro is available to maps (along with the others I mentioned > > before), including executable maps as an environment variable, and as a > > macro variable for normal maps, when using version 5. > > > > but this is _after_ the executable map is processed, so its usability > is very limited. What do you mean "after" it's processed. It, along with the other variables, are set in the environment prior to executing the map. Ian _______________________________________________ autofs mailing list [email protected] http://linux.kernel.org/mailman/listinfo/autofs
