diff options
author | dteske <dteske@FreeBSD.org> | 2013-06-08 18:08:17 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-06-08 18:08:17 +0000 |
commit | cbf1a17fa6d0d3ea347e80d9ab10a81a084e149e (patch) | |
tree | 17f4a267c3f8d6b4011dae08dd6e2f16b9913508 | |
parent | a84a4d50b2e52466c8abf58da72585030f3140f0 (diff) | |
download | FreeBSD-src-cbf1a17fa6d0d3ea347e80d9ab10a81a084e149e.zip FreeBSD-src-cbf1a17fa6d0d3ea347e80d9ab10a81a084e149e.tar.gz |
Check for ESC as a separate choice from "NO" when asking if the operator
would like to disable password management for an account while adding either
a user or group. When being prompted to answer questions while adding a
group or user, two things are trow:
1. You can hit ENTER to blast through all the questions and in the end, the
group or user is created with sensible defaults for all values.
2. You can press ESC during any prompt to cancel the operation as a whole.
This fix is shoring up an inconsistency in the latter (#2).
-rw-r--r-- | usr.sbin/bsdconfig/usermgmt/share/group_input.subr | 8 | ||||
-rw-r--r-- | usr.sbin/bsdconfig/usermgmt/share/user_input.subr | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/bsdconfig/usermgmt/share/group_input.subr b/usr.sbin/bsdconfig/usermgmt/share/group_input.subr index ef45070..1c8ed67 100644 --- a/usr.sbin/bsdconfig/usermgmt/share/group_input.subr +++ b/usr.sbin/bsdconfig/usermgmt/share/group_input.subr @@ -237,10 +237,10 @@ f_dialog_input_group_password() # Check for NULL entry if [ ! "$_password1" ]; then - f_dialog_yesno \ - "$msg_disable_password_auth_for_group" || - continue - pw_group_password_disable=1 + 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 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 a06f707..db5b8b9 100644 --- a/usr.sbin/bsdconfig/usermgmt/share/user_input.subr +++ b/usr.sbin/bsdconfig/usermgmt/share/user_input.subr @@ -334,10 +334,10 @@ f_dialog_input_password() # Check for NULL entry if [ ! "$_password1" ]; then - f_dialog_yesno \ - "$msg_disable_password_auth_for_account" || - continue - pw_password_disable=1 + 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 else pw_password_disable= fi |