From: Marcos Diez <marcos@unitron.com.br>
To: autofs@linux.kernel.org
Subject: nonroot umount
Date: Mon, 10 Jul 2006 23:26:48 +0000 [thread overview]
Message-ID: <44B2E238.2010203@unitron.com.br> (raw)
In-Reply-To: <200607100726.k6A7Po1e029994@hera.kernel.org>
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
next parent reply other threads:[~2006-07-10 23:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200607100726.k6A7Po1e029994@hera.kernel.org>
2006-07-10 23:26 ` Marcos Diez [this message]
2006-07-11 12:39 ` nonroot umount Peter Staubach
2006-07-11 13:47 ` Jeff Moyer
2006-07-11 14:09 ` Peter Staubach
2006-07-11 22:56 Jim Dennis
2006-07-11 23:12 ` Jeff Moyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44B2E238.2010203@unitron.com.br \
--to=marcos@unitron.com.br \
--cc=autofs@linux.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.