On Thu, Oct 21, 2021 at 10:29:02AM +0000, Klemens Nanni wrote:
> 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.
New diff against -CURRENT.
I'll commit this diff once I get positive feedback/an OK or tested it
myself.
Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1183
diff -u -p -r1.1183 install.sub
--- install.sub 24 Oct 2021 12:32:42 -0000 1.1183
+++ install.sub 24 Oct 2021 12:35:35 -0000
@@ -1245,19 +1245,19 @@ ieee80211_config() {
quote join "$_nwid" >>$_hn
break
;;
- ?-[Ww]) ask_until "WEP key? (will echo)"
+ ?-[Ww]) ask_password "WEP key?"
# Make sure ifconfig accepts the key.
- if _err=$(ifconfig $_if join "$_nwid" nwkey
"$resp" 2>&1) &&
+ if _err=$(ifconfig $_if join "$_nwid" nwkey
"$_password" 2>&1) &&
[[ -z $_err ]]; then
- quote join "$_nwid" nwkey "$resp" >>$_hn
+ quote join "$_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 join "$_nwid" wpakey "$resp";
then
- quote join "$_nwid" wpakey "$resp"
>>$_hn
+ if ifconfig $_if join "$_nwid" wpakey
"$_password"; then
+ quote join "$_nwid" wpakey "$_password"
>>$_hn
break
fi
;;