All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Peter Staubach <staubach@redhat.com>
Cc: autofs@linux.kernel.org, Marcos Diez <marcos@unitron.com.br>
Subject: Re: nonroot umount
Date: Tue, 11 Jul 2006 09:47:06 -0400	[thread overview]
Message-ID: <x49veq4l0dh.fsf@redhat.com> (raw)
In-Reply-To: <44B39BE5.6040309@redhat.com> (Peter Staubach's message of "Tue, 11 Jul 2006 08:39:01 -0400")

==> Regarding Re: [autofs] nonroot umount; Peter Staubach <staubach@redhat.com> 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

  reply	other threads:[~2006-07-11 13:47 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 ` nonroot umount Marcos Diez
2006-07-11 12:39   ` Peter Staubach
2006-07-11 13:47     ` Jeff Moyer [this message]
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=x49veq4l0dh.fsf@redhat.com \
    --to=jmoyer@redhat.com \
    --cc=autofs@linux.kernel.org \
    --cc=marcos@unitron.com.br \
    --cc=staubach@redhat.com \
    /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.