built-in PATH seems to have sbin and bin out of order; and inconsistent
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
bash (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Undecided
|
Unassigned | ||
busybox (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
dash (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
dpkg (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
pam (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
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/
$ env -u PATH /bin/dash -c 'echo $PATH'
/usr/local/
$ systemd-run --unit test-env env # ... and check journal for PATH
/usr/local/
$ env -u PATH /bin/bash -c 'echo $PATH'
/usr/local/
$ env -u PATH /bin/busybox sh -c 'echo $PATH'
/sbin:/
$ grep 'export PATH=' -r initramfs-
initramfs-
initramfs-
dracut.sh has DRACUT_
dracut-
$ cat /etc/environment
PATH="/
apt & dpkg => should probably initiate /usr/local-less PATH
Imho the rest should probably be harmonised to:
/usr/local/
===
From a duplicate https:/
$ 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/
12.10
/usr/local/
13.04
/usr/local/
13.10
/usr/local/
14.04
/usr/local/
14.10
/usr/local/
15.04
/usr/local/
15.10
/usr/local/
16.04
/usr/local/
I believe later releases of bash, do too include CWD in the built-in PATH.
summary: |
- built-in PATH seems to have sbin and bin out of order + built-in PATH seems to have sbin and bin out of order; and inconsistent |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in bash (Debian): | |
status: | Unknown → New |
description: | updated |
Changed in bash (Debian): | |
importance: | Unknown → Undecided |
affects: | bash (Debian) → ubuntu-translations |
no longer affects: | ubuntu-translations |
no longer affects: | apt (Ubuntu Cosmic) |
no longer affects: | busybox (Ubuntu Cosmic) |
no longer affects: | dash (Ubuntu Cosmic) |
no longer affects: | dpkg (Ubuntu Cosmic) |
no longer affects: | pam (Ubuntu Cosmic) |
no longer affects: | systemd (Ubuntu Cosmic) |
Changed in bash (Ubuntu Cosmic): | |
status: | New → Fix Released |
information type: | Public Security → Public |
Bash regression appears to have been introduced in: /git.launchpad. net/ubuntu/ +source/ bash/diff/ debian/ patches/ deb-bash- config. diff?id= c2fee82da8f6caa 77764ac65bb7fc2 37314915f8
https:/
i.e. 4.3~rc1-1 upload to debian/experimental https:/ /git.launchpad. net/ubuntu/ +source/ bash/commit/ ?id=c2fee82da8f 6caa77764ac65bb 7fc237314915f8