==> Regarding Re: [autofs] nonroot umount; Peter Staubach <[EMAIL PROTECTED]> 
adds:

staubach> Marcos Diez wrote:
>> In a Unix desktop system automount is very practical for CDROMs, digital
>> cameras, USB flash drives and any other type of removable media.
>> But it is annoying to the unprivileged user to wait the timeout to
>> remove the media.
>> 
>> Since it is insecure to allow the user to do a "killall -s SIGUSR1
>> automount", I wrote a program that does exactly (and only) that. Of
>> course it must be suid root, but it makes life much easier. I double
>> verified that there are no buffer overflows and I believe it's safe. The
>> program is not interactive, so a malicious user can't do much with it
>> anyway.
>> 
>> It gets the PIDs from instances of automount by parsing /proc/mounts
>> It would be nice if it could be added to the autofs distribution.
>> 
>> 
>> http://boby.unitron.com.br/%7Emarcos/umounter.c
>> 
>> 
>> To compile:
>> 
>> gcc -O3 -ansi -Wall -pedantic umounter.c -o umounter
>> 
>> To install:
>> cp umounter /usr/local/bin && chmod 4711 /usr/local/bin/umounter
>> 
>> To use:
>> 
>> ./umounter
>> or
>> ./umounter --verbose
>> (show the signaled PIDs )
>> 

staubach> It seems to me that a better architected solution might be to tie in
staubach> the automounter with the eject(1) sort of command.

staubach> It is not good for a user to have to know that he needs to zing the
staubach> automounter in order to remove his media.

What "desktop" system are we talking about?  If you're using hal/udev, then
they have a much nicer mechanism for handling such things.  Autofs isn't
really a good fit for removable media, in my experience.

-Jeff

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to