From e2d28d78a8ed94e5d41aa07fc980ff7b07df042c Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 31 Jan 2018 00:02:00 +0100 Subject: forget user input once not needed anymore; esp. don't leak the WiFi password by accident --- install-itzks-workstation | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install-itzks-workstation b/install-itzks-workstation index fa234f2..535d88a 100644 --- a/install-itzks-workstation +++ b/install-itzks-workstation @@ -67,6 +67,7 @@ case ${answer:0:1} in : ;; esac +unset answer #################### @@ -137,11 +138,16 @@ read -p 'Wie lautet die SSID? ' ssid sed -i 's/@SSID@/'"$ssid"'/' /etc/NetworkManager/system-connections/SSID.in read -p 'Wie lautet das zugehörige Passwort? ' passw sed -i 's/@password@/'"$passw"'/' /etc/NetworkManager/system-connections/SSID.in +unset passw + +# move tweaked template to real configuration file mv /etc/NetworkManager/system-connections/SSID.in /etc/NetworkManager/system-connections/"$ssid" # Set permissions on generated file chmod go-rwx /etc/NetworkManager/system-connections/"$ssid" +unset ssid + # Write new content for /usr/share/debian-edu-config/tools/wpad-extract. # Workaround for Debian bug #888829. Probably fixed with debian-edu-config 1.929+deb9u1. @@ -185,6 +191,7 @@ es mw101.intern heißen. [ENTER]' read -p 'Wie lautet der Hostname (ohne Domain)? ' myhost hostnamectl set-hostname "$myhost" export HOSTNAME="$myhost" +unset myhost # To be sure restart the following services invoke-rc.d rsyslog restart -- cgit v1.2.3