bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21010: eject fails because of hardcoded path to umount


From: Andreas Enge
Subject: bug#21010: eject fails because of hardcoded path to umount
Date: Wed, 8 Jul 2015 18:31:44 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]