GNU bug report logs - #21010
eject fails because of hardcoded path to umount

Previous Next

Package: guix;

Reported by: alex.sassmannshausen <at> gmail.com

Date: Wed, 8 Jul 2015 12:19:02 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21010 in the body.
You can then email your comments to 21010 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#21010; Package guix. (Wed, 08 Jul 2015 12:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to alex.sassmannshausen <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 08 Jul 2015 12:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: eject fails because of hardcoded path to umount
Date: Wed, 08 Jul 2015 14:18:21 +0200
Hello,

I'm running GuixSD.

I tried to 'eject' a pen drive today using
`sudo eject /mnt/usb`

The command failed with 
-------8<---------------->8-----------
eject: unable to exec /bin/umount of `/mnt/usb'
eject: unmount of `/mnt/usb' failed
-------8<---------------->8-----------

Some more information:
-------8<---------------->8-----------
# which eject
/run/current-system/profile/bin/eject
# mount /dev/sdb /mnt/usb
# eject /mnt/usb
eject: unable to exec /bin/umount of `/mnt/usb'
eject: unmount of `/mnt/usb' failed
-------8<---------------->8-----------

HTH, let me know if you want me to test or provide anything else.

Cheers,
Alex




Information forwarded to bug-guix <at> gnu.org:
bug#21010; Package guix. (Wed, 08 Jul 2015 16:32:02 GMT) Full text and rfc822 format available.

Message #8 received at 21010 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com>
Cc: 21010 <at> debbugs.gnu.org
Subject: Re: bug#21010: eject fails because of hardcoded path to umount
Date: Wed, 8 Jul 2015 18:31:44 +0200
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





Information forwarded to bug-guix <at> gnu.org:
bug#21010; Package guix. (Wed, 08 Jul 2015 22:06:01 GMT) Full text and rfc822 format available.

Message #11 received at 21010 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Andreas Enge <andreas <at> enge.fr>
Cc: Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com>,
 21010 <at> debbugs.gnu.org
Subject: Re: bug#21010: eject fails because of hardcoded path to umount
Date: Thu, 09 Jul 2015 00:05:11 +0200
Andreas Enge <andreas <at> enge.fr> skribis:

> 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 fixed in core-updates.

> 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",

I think we should check what this list is used for, and then prepend
entries accordingly.  Volunteering?  :-)

Ludo’.




Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Tue, 14 Jul 2015 12:04:02 GMT) Full text and rfc822 format available.

Notification sent to alex.sassmannshausen <at> gmail.com:
bug acknowledged by developer. (Tue, 14 Jul 2015 12:04:02 GMT) Full text and rfc822 format available.

Message #16 received at 21010-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com>
Cc: 21010-done <at> debbugs.gnu.org
Subject: Re: bug#21010: eject fails because of hardcoded path to umount
Date: Tue, 14 Jul 2015 14:03:41 +0200
Alex Sassmannshausen <alex.sassmannshausen <at> gmail.com> skribis:

> I tried to 'eject' a pen drive today using
> `sudo eject /mnt/usb`

BTW, if you add this user account to “cdrom”, you won’t even need
‘sudo’.

> The command failed with 
> -------8<---------------->8-----------
> eject: unable to exec /bin/umount of `/mnt/usb'
> eject: unmount of `/mnt/usb' failed
> -------8<---------------->8-----------

Fixed in 7e51249.

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 12 Aug 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 253 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.