New comment by tornaria on void-packages repository https://github.com/void-linux/void-packages/pull/50280#issuecomment-2108871504 Comment: The following would "fix" the default `PATH` in bash (to exclude `.`): ```diff --- a/srcpkgs/bash/template +++ b/srcpkgs/bash/template @@ -24,7 +24,11 @@ alternatives=" sh:sh:/usr/bin/bash sh:sh.1:/usr/share/man/man1/bash.1" -CFLAGS="-DSSH_SOURCE_BASHRC -DNON_INTERACTIVE_LOGIN_SHELLS -DSYS_BASHRC='\"/etc/bash/bashrc\"'" +CFLAGS="\ + -DSSH_SOURCE_BASHRC \ + -DNON_INTERACTIVE_LOGIN_SHELLS \ + -DDEFAULT_PATH_VALUE='\"/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin\"' \ + -DSYS_BASHRC='\"/etc/bash/bashrc\"'" post_install() { rm -r ${DESTDIR}/usr/share/doc ``` It's not a very common situation to start bash with unset `PATH`, so this is not that important. ---- On the other hand, adding `-DSSH_SOURCE_BASAHRC` is IMHO very, very, necessary, and the only way (afaik) to have a reasonable bash startup that works fine with ssh (e.g. to setup `PATH`, etc).