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

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 )
>

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

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

    Thanx...

       ps

  reply	other threads:[~2006-07-11 12:39 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 [this message]
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=44B39BE5.6040309@redhat.com \
    --to=staubach@redhat.com \
    --cc=autofs@linux.kernel.org \
    --cc=marcos@unitron.com.br \
    /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.