sshtool: quote password to fix shell interpretation

This commit is contained in:
Baptiste Jonglez 2022-12-06 23:13:32 +01:00
parent 5bed1e66db
commit c9bcfb5e46

View file

@ -28,10 +28,10 @@ SSH_CONFIG=cluster/$CLUSTER/ssh_config
function header { function header {
cat <<EOF cat <<EOF
export DEPLOYTOOL_ROOT_PASSWORD=$ROOT_PASS export DEPLOYTOOL_ROOT_PASSWORD="$ROOT_PASS"
cat > /tmp/deploytool_askpass <<EOG cat > /tmp/deploytool_askpass <<EOG
#!/usr/bin/env sh #!/usr/bin/env sh
echo \$DEPLOYTOOL_ROOT_PASSWORD echo "\$DEPLOYTOOL_ROOT_PASSWORD"
EOG EOG
chmod +x /tmp/deploytool_askpass chmod +x /tmp/deploytool_askpass
export SUDO_ASKPASS=/tmp/deploytool_askpass export SUDO_ASKPASS=/tmp/deploytool_askpass