unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Enge <andreas@enge.fr>
To: Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
Cc: 21010@debbugs.gnu.org
Subject: bug#21010: eject fails because of hardcoded path to umount
Date: Wed, 8 Jul 2015 18:31:44 +0200	[thread overview]
Message-ID: <20150708163144.GA11642@debian> (raw)
In-Reply-To: <871tgig7w2.fsf@gmail.com>

On Wed, Jul 08, 2015 at 02:18:21PM +0200, Alex Sassmannshausen wrote:
> eject: unable to exec /bin/umount of `/mnt/usb'

The culprit is in the source code of util-linux-2.25.2/sys-utils/eject.c:
681:                    execl("/bin/umount", "/bin/umount", name, "-n", NULL);
683:                    execl("/bin/umount", "/bin/umount", name, NULL);
685:            errx(EXIT_FAILURE, _("unable to exec /bin/umount of `%s'"), name);

This should be easy to patch, but there are other utilities with the same
problem. A hopeless case seems to be "whereis": It looks for files in fixed
lists of locations such as
static const char *bindirs[] = {
        "/usr/bin",
        "/usr/sbin",
        "/usr/lib",
        "/usr/lib64",
        "/bin",
        "/sbin",
        "/etc",
        "/usr/etc",
        "/lib",
        "/lib64",
        "/usr/games",
        "/usr/games/bin",
        "/usr/games/lib",
        "/usr/emacs/etc",
        "/usr/lib/emacs/*/etc",
        "/usr/TeX/bin",
...

Andreas

  reply	other threads:[~2015-07-08 16:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08 12:18 bug#21010: eject fails because of hardcoded path to umount Alex Sassmannshausen
2015-07-08 16:31 ` Andreas Enge [this message]
2015-07-08 22:05   ` Ludovic Courtès
2015-07-14 12:03 ` Ludovic Courtès

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150708163144.GA11642@debian \
    --to=andreas@enge.fr \
    --cc=21010@debbugs.gnu.org \
    --cc=alex.sassmannshausen@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).