google-compute-engine-oslogin: fix bash reference

This is the bash that is being called when logging into the VM. This
fixes prompt escaping issues and also restores tab completion to the
logged-in user.
This commit is contained in:
zimbatm 2020-04-01 13:15:45 +02:00
parent 5e37578dd9
commit 4ebd229369
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7

View file

@ -3,6 +3,7 @@
, curl
, json_c
, pam
, bashInteractive
}:
stdenv.mkDerivation rec {
@ -22,7 +23,7 @@ stdenv.mkDerivation rec {
# change sudoers dir from /var/google-sudoers.d to /run/google-sudoers.d (managed through systemd-tmpfiles)
substituteInPlace pam_module/pam_oslogin_admin.cc --replace /var/google-sudoers.d /run/google-sudoers.d
# fix "User foo not allowed because shell /bin/bash does not exist"
substituteInPlace compat.h --replace /bin/bash ${stdenv.shell}
substituteInPlace compat.h --replace /bin/bash ${bashInteractive}/bin/bash
'';
buildInputs = [ curl.dev pam ];