On Thu, Oct 21, 2021 at 04:06:53AM -0600, Theo de Raadt wrote:
> Can people handle typing these passwords blindly? I suspect yes.
>
> Then this seems like a reasonable solution.
Other systems do the redacted typing thing, so you see **** instead of
what you actually typed; I think we're used to that and blindly typing
is not much different... prompts like doas(1) do it as well.
I didn't test autoinstall(8) and thought that was a problem since this
diff changes the WEP/WPA passphrase questions from one to two answers if
you will, but now I remembered that this obviously isn't a problem for
the user password question either.
Anyone willing to test this for me or even OK it?
I can't do wifi installations here/now but am pretty confident that this
does the right thing.
Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1180
diff -u -p -r1.1180 install.sub
--- install.sub 17 Oct 2021 13:20:46 -0000 1.1180
+++ install.sub 17 Oct 2021 17:35:15 -0000
@@ -1245,19 +1245,19 @@ ieee80211_config() {
quote nwid "$_nwid" >>$_hn
break
;;
- ?-[Ww]) ask_until "WEP key? (will echo)"
+ ?-[Ww]) ask_until "WEP key?"
# Make sure ifconfig accepts the key.
- if _err=$(ifconfig $_if nwid "$_nwid" nwkey
"$resp" 2>&1) &&
+ if _err=$(ifconfig $_if nwid "$_nwid" nwkey
"$_password" 2>&1) &&
[[ -z $_err ]]; then
- quote nwid "$_nwid" nwkey "$resp" >>$_hn
+ quote nwid "$_nwid" nwkey "$_password"
>>$_hn
break
fi
echo "$_err"
;;
- 1-[Pp]) ask_until "WPA passphrase? (will echo)"
+ 1-[Pp]) ask_password "WPA passphrase?"
# Make sure ifconfig accepts the key.
- if ifconfig $_if nwid "$_nwid" wpakey "$resp";
then
- quote nwid "$_nwid" wpakey "$resp"
>>$_hn
+ if ifconfig $_if nwid "$_nwid" wpakey
"$_password"; then
+ quote nwid "$_nwid" wpakey "$_password"
>>$_hn
break
fi
;;