Package: dash Version: 0.5.8-2.4 Severity: normal Usertags: home The HOME environment variable does not have to be present, programs must fall back to the value in the passwd file. dash does not do this in the following two places.
* When running cd without any argument * When expanding tilde (~) characters The dash cd docs say "default HOME" without clarifying if this is a shell variable or the user's home directory. The dash tilde expansion docs say "the value of the HOME variable (the current user's home directory)". POSIX leaves both of these as implementation defined so it would be good if dash falls back on the user's home dir if HOME is unset. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_01 pabs@chianamo ~ $ dash $ pwd /home/pabs $ echo ~ /home/pabs $ mkdir tmp $ cd tmp $ pwd /home/pabs/tmp $ cd $ pwd /home/pabs $ unset HOME $ echo ~ ~ $ cd tmp $ pwd /home/pabs/tmp $ cd $ pwd /home/pabs/tmp $ getent passwd pabs | cut -d: -f6 /home/pabs -- System Information: Debian Release: 9.0 APT prefers testing-debug APT policy: (900, 'testing-debug'), (900, 'testing'), (860, 'testing-proposed-updates'), (800, 'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages dash depends on: ii debianutils 4.8.1 ii dpkg 1.18.23 ii libc6 2.24-9 dash recommends no packages. dash suggests no packages. -- debconf information: * dash/sh: true -- bye, pabs https://wiki.debian.org/PaulWise
signature.asc
Description: This is a digitally signed message part

