group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #30281
[Bug 1792004] Re: built-in PATH seems to have sbin and bin out of order; and inconsistent
This bug was fixed in the package bash - 4.4.18-2ubuntu1.1
---------------
bash (4.4.18-2ubuntu1.1) bionic; urgency=medium
* Resurrect "Set the default path to comply with Debian policy" in
deb-bash-config.diff which went missing since 4.2+dfsg-1 or so.
LP: #1792004 LP: #1614080 Closes: #781367
* Add autopkgtest for the built-in path.
-- Dimitri John Ledkov <xnox@xxxxxxxxxx> Fri, 03 May 2019 14:50:32
+0100
** Changed in: bash (Ubuntu Bionic)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1792004
Title:
built-in PATH seems to have sbin and bin out of order; and
inconsistent
Status in apt package in Ubuntu:
Fix Released
Status in bash package in Ubuntu:
Fix Released
Status in busybox package in Ubuntu:
New
Status in dash package in Ubuntu:
New
Status in dpkg package in Ubuntu:
Won't Fix
Status in pam package in Ubuntu:
New
Status in systemd package in Ubuntu:
New
Status in bash source package in Xenial:
Fix Committed
Status in bash source package in Bionic:
Fix Released
Status in bash source package in Cosmic:
Fix Released
Status in bash source package in Disco:
Fix Released
Bug description:
[Impact]
* For consistency reasons sbin should be ordered before bin in PATH.
[Test Case]
* $ env -u PATH /bin/bash -c 'echo $PATH'
And check that matching pairs in PATH, have /sbin variant leading /bin
variant.
[Regression Potential]
* Ubuntu does not ship duplicate binries, with different behaviour
between /sbin and /bin, thus all binaries will continue to be found in
all locations. Also PATH is normally already set in the environment,
and this change only affects the fallback path when bash is executed
without any environment, i.e. booting with 'init=/bin/bash'
[Other Info]
* Original bug report detailing inconsistent paths between various shells.
---
$ env -u PATH /bin/sh -c 'echo $PATH'
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
$ env -u PATH /bin/dash -c 'echo $PATH'
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
$ systemd-run --unit test-env env # ... and check journal for PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
$ env -u PATH /bin/bash -c 'echo $PATH'
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
$ env -u PATH /bin/busybox sh -c 'echo $PATH'
/sbin:/usr/sbin:/bin:/usr/bin
$ grep 'export PATH=' -r initramfs-tools-0.131ubuntu10/
initramfs-tools-0.131ubuntu10/mkinitramfs:export PATH='/usr/bin:/sbin:/bin'
initramfs-tools-0.131ubuntu10/init:export PATH=/sbin:/usr/sbin:/bin:/usr/bin
dracut.sh has DRACUT_PATH=${DRACUT_PATH:-/sbin /bin /usr/sbin /usr/bin} exported as PATH
dracut-047+31/modules.d/99shutdown/shutdown.sh:export PATH=/usr/sbin:/usr/bin:/sbin:/bin
$ cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
apt & dpkg => should probably initiate /usr/local-less PATH
Imho the rest should probably be harmonised to:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
===
From a duplicate
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1614080 :
$ for i in 12.04 12.10 13.04 13.10 14.04 14.10 15.04 15.10 16.04; do echo $i; docker run -it --rm ubuntu:$i bash -c "unset PATH; /bin/bash -c 'echo \$PATH'"; done
12.04
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
12.10
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
13.04
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
13.10
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
14.04
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
14.10
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
15.04
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
15.10
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
16.04
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
I believe later releases of bash, do too include CWD in the built-in
PATH.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1792004/+subscriptions