zshenv: avoid placing empty components in PATH; reorder root's PATH
authorDr. András Korn <korn-github.com@elan.rulez.org>
Mon, 1 Jun 2015 09:12:40 +0000 (11:12 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 3 Jun 2015 22:07:21 +0000 (00:07 +0200)
commit69488205afe631b2d9489d0941d3290e1577faf9
tree1f57df9858dd9c1dc87ad0e0b69debe6fc3ad0fc
parentdbd02d77939c414b67b808fab0d5624fb836421b
zshenv: avoid placing empty components in PATH; reorder root's PATH

zsh treats an empty PATH component ("::") as ".", which creates a
security hole. Sanitize PATH by explicitly removing empty
components.

As agreed on #grml, root's PATH should also list /usr/local/sbin
and /usr/local/bin before /sbin, /bin, /usr/sbin and /usr/bin;
and there is no harm in adding $HOME/bin unconditionally as the
first PATH component.
etc/zsh/zshenv