summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/usermgmt
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-06-08 18:23:41 +0000
committerdteske <dteske@FreeBSD.org>2013-06-08 18:23:41 +0000
commitcdb2b25b556def91177507859a1579db78703d0c (patch)
tree0cbe6318e4ad9698014ae45fb29b22bfc0e76943 /usr.sbin/bsdconfig/usermgmt
parent75cf89493f568bc559cf4e1bb6c9e82405bcd286 (diff)
downloadFreeBSD-src-cdb2b25b556def91177507859a1579db78703d0c.zip
FreeBSD-src-cdb2b25b556def91177507859a1579db78703d0c.tar.gz
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.
Diffstat (limited to 'usr.sbin/bsdconfig/usermgmt')
-rw-r--r--usr.sbin/bsdconfig/usermgmt/share/group_input.subr10
-rw-r--r--usr.sbin/bsdconfig/usermgmt/share/user_input.subr10
2 files changed, 14 insertions, 6 deletions
diff --git a/usr.sbin/bsdconfig/usermgmt/share/group_input.subr b/usr.sbin/bsdconfig/usermgmt/share/group_input.subr
index 400c3fc..babcee7 100644
--- a/usr.sbin/bsdconfig/usermgmt/share/group_input.subr
+++ b/usr.sbin/bsdconfig/usermgmt/share/group_input.subr
@@ -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
diff --git a/usr.sbin/bsdconfig/usermgmt/share/user_input.subr b/usr.sbin/bsdconfig/usermgmt/share/user_input.subr
index f2795f8..64a020d 100644
--- a/usr.sbin/bsdconfig/usermgmt/share/user_input.subr
+++ b/usr.sbin/bsdconfig/usermgmt/share/user_input.subr
@@ -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
OpenPOWER on IntegriCloud