← Back to team overview

ubuntu-translations-coordinators team mailing list archive

[Bug 1792004] Re: built-in PATH seems to have sbin and bin out of order; and inconsistent

 

** Changed in: bash (Debian)
   Importance: Unknown => Undecided

** Changed in: bash (Debian)
 Remote watch: Debian Bug tracker #781367 => None

** Package changed: bash (Debian) => ubuntu-translations

** No longer affects: ubuntu-translations

** Bug watch removed: Debian Bug tracker #781367
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=781367

** Also affects: apt (Ubuntu Cosmic)
   Importance: Undecided
       Status: New

** Also affects: bash (Ubuntu Cosmic)
   Importance: Undecided
       Status: New

** Also affects: dash (Ubuntu Cosmic)
   Importance: Undecided
       Status: New

** Also affects: dpkg (Ubuntu Cosmic)
   Importance: Undecided
       Status: New

** Also affects: pam (Ubuntu Cosmic)
   Importance: Undecided
       Status: New

** Also affects: busybox (Ubuntu Cosmic)
   Importance: Undecided
       Status: New

** Also affects: systemd (Ubuntu Cosmic)
   Importance: Undecided
       Status: New

** 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

-- 
You received this bug notification because you are a member of Ubuntu
Translations Coordinators, which is subscribed to Ubuntu Translations.
Matching subscriptions: Ubuntu Translations bug mail
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 Committed
Status in bash source package in Cosmic:
  Fix Released
Status in bash source package in Disco:
  Fix Committed

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