lol

fhs-userenv: don't use bash login mode

Login mode can cause hidden problems, e.g. #12406. Generally we don't want
to read user's .bash_profile when we don't start an interactive shell inside
a chroot.

+3 -1
+3 -1
pkgs/build-support/build-fhs-userenv/default.nix
··· 12 12 ''; 13 13 14 14 init = run: writeText "${name}-init" '' 15 + source /etc/profile 16 + 15 17 # Make /tmp directory 16 18 mkdir -m 1777 /tmp 17 19 ··· 44 46 cat <<EOF >$out/bin/${name} 45 47 #! ${stdenv.shell} 46 48 export CHROOTENV_EXTRA_BINDS="${lib.concatStringsSep ":" extraBindMounts}:\$CHROOTENV_EXTRA_BINDS" 47 - exec ${chroot-user}/bin/chroot-user ${env} ${bash'} -l ${init runScript} "\$(pwd)" "\$@" 49 + exec ${chroot-user}/bin/chroot-user ${env} ${bash'} ${init runScript} "\$(pwd)" "\$@" 48 50 EOF 49 51 chmod +x $out/bin/${name} 50 52 ${extraInstallCommands}