summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/password/share/password.subr
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bsdconfig/password/share/password.subr')
-rw-r--r--usr.sbin/bsdconfig/password/share/password.subr29
1 files changed, 9 insertions, 20 deletions
diff --git a/usr.sbin/bsdconfig/password/share/password.subr b/usr.sbin/bsdconfig/password/share/password.subr
index 2d407c4..ad1b2a1 100644
--- a/usr.sbin/bsdconfig/password/share/password.subr
+++ b/usr.sbin/bsdconfig/password/share/password.subr
@@ -69,10 +69,9 @@ f_dialog_input_password()
#
# Loop until the user provides taint-free/valid input
#
- local retval _password1 _password2
+ local _password1 _password2
while :; do
- local dialog_inputbox
- dialog_inputbox=$( $DIALOG \
+ _password1=$( $DIALOG \
--title "$DIALOG_TITLE" \
--backtitle "$DIALOG_BACKTITLE" \
--hline "$hline" \
@@ -82,16 +81,11 @@ f_dialog_input_password()
--passwordbox "$msg" \
$height1 $width1 \
2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
+ ) || return $?
+ # Return if user either pressed ESC or chose Cancel/No
+ debug= f_dialog_line_sanitize _password1
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _password1=$( f_dialog_inputstr )
-
- # Return if user has either pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || return $retval
-
- dialog_inputbox=$( $DIALOG \
+ _password2=$( $DIALOG \
--title "$DIALOG_TITLE" \
--backtitle "$DIALOG_BACKTITLE" \
--hline "$hline" \
@@ -101,14 +95,9 @@ f_dialog_input_password()
--passwordbox "$rmsg" \
$height2 $width2 \
2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
-
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- _password2=$( f_dialog_inputstr )
-
- # Return if user has either pressed ESC or chosen Cancel/No
- [ $retval -eq $SUCCESS ] || return $retval
+ ) || return $?
+ # Return if user either pressed ESC or chose Cancel/No
+ debug= f_dialog_line_sanitize _password2
# Check for NULL entry
if ! [ "$_password1" -o "$_password2" ]; then
OpenPOWER on IntegriCloud