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 )


Thanks

-- 
Marcos Diez
+49 178 507 9577
Skype: aboboraabobora




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

Reply via email to