Curb another regression (this one introduced by r251545, itself trying to

fix the regression introduced by r251544; which was trying to make things
consistent w/respect to ESC versus YES versus NO in the password disable
prompt in "Login Management".

(need stronger coffee; very sorry for the churn)

With this revision, the "YES", "NO", and implied ESC options all work as-
expected. Choosing "YES" allows you to proceed and the password will be
disabled. Choosing "NO" will bring back around to enter a password for the
account. Pressing ESC will drop you out of either user or group input and
back to the usermgmt screen.
This commit is contained in:
Devin Teske 2013-06-08 18:23:41 +00:00
parent 8830b71de2
commit 528318ae53
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=251547
2 changed files with 14 additions and 6 deletions

View File

@ -239,9 +239,13 @@ f_dialog_input_group_password()
if [ ! "$_password1" ]; then
f_dialog_yesno "$msg_disable_password_auth_for_group"
local retval=$?
[ $retval -eq 255 ] && return $retval # ESC was pressed
[ $retval -eq $SUCCESS ] && pw_group_password_disable=1
continue # back to password prompt
if [ $retval -eq 255 ]; then # ESC was pressed
return $retval
elif [ $retval -eq $SUCCESS ]; then
pw_group_password_disable=1
else
continue # back to password prompt
fi
else
pw_group_password_disable=
fi

View File

@ -336,9 +336,13 @@ f_dialog_input_password()
if [ ! "$_password1" ]; then
f_dialog_yesno "$msg_disable_password_auth_for_account"
local retval=$?
[ $retval -eq 255 ] && return $retval # ESC was pressed
[ $retval -eq $SUCCESS ] && pw_password_disable=1
continue # back to password prompt
if [ $retval -eq 255 ]; then # ESC was pressed
return $retval
elif [ $retval -eq $SUCCESS ]; then
pw_password_disable=1
else
continue # back to password prompt
fi
else
pw_password_disable=
fi