summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-04-19 14:13:44 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-04-19 14:13:44 +0200
commit72f5c2d2274c80452c50fd99a8b0043487bca9bf (patch)
tree036264420f98f562e97d8ecb3e152b97216f38ae
parent82a1fdfec988bb7e2e36ddcc9f68c17a53abdbfd (diff)
downloadalpine-conf-72f5c2d2274c80452c50fd99a8b0043487bca9bf.zip
setup-interfaces: strip comment of wifi password
wpa_passphrase will add a comment of the password in clear text. Strip this. fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10509
-rw-r--r--setup-interfaces.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup-interfaces.in b/setup-interfaces.in
index e6cbf57..9933759 100644
--- a/setup-interfaces.in
+++ b/setup-interfaces.in
@@ -140,7 +140,7 @@ config_wpa_supp() {
local iface="$1" essid="$2" auth_type="$3" psk="$4"
local conffile=/etc/wpa_supplicant/wpa_supplicant.conf
if [ "$auth_type" = "WPA-PSK" ]; then
- wpa_passphrase "$essid" "$psk" >> "$conffile"
+ (umask 0077 && wpa_passphrase "$essid" "$psk" | sed -e '/^\t#psk=.*/d' >> "$conffile")
else
cat << EOF >> $conffile
network={