diff options
author | dteske <dteske@FreeBSD.org> | 2013-06-08 17:36:31 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-06-08 17:36:31 +0000 |
commit | f088cbc9d3ad84804b8704c9cb8b0af0e102140c (patch) | |
tree | 785206c297a82dab1ddcfcec5147bb7ecf073a3e /usr.sbin/bsdconfig/usermgmt/share/user_input.subr | |
parent | 4c3e94bc91562e3962e5096402deefba4b0d7c88 (diff) | |
download | FreeBSD-src-f088cbc9d3ad84804b8704c9cb8b0af0e102140c.zip FreeBSD-src-f088cbc9d3ad84804b8704c9cb8b0af0e102140c.tar.gz |
Fix a regression in the "Login Management" module introduced by r251242 in
which choosing to cancel the manual input of expiration time (in seconds
since the UNIX epoch) for either account expiration or password expiration
would see the original value lost.
Diffstat (limited to 'usr.sbin/bsdconfig/usermgmt/share/user_input.subr')
-rw-r--r-- | usr.sbin/bsdconfig/usermgmt/share/user_input.subr | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/bsdconfig/usermgmt/share/user_input.subr b/usr.sbin/bsdconfig/usermgmt/share/user_input.subr index 746fa11..74f7fc2 100644 --- a/usr.sbin/bsdconfig/usermgmt/share/user_input.subr +++ b/usr.sbin/bsdconfig/usermgmt/share/user_input.subr @@ -591,14 +591,16 @@ f_dialog_input_expire_password() break ;; 4) # Enter value manually - local msg + local msg ret_secs msg=$( printf "$msg_number_of_seconds_since_epoch" \ "$( date -r 1 "+%c %Z" )" ) # Return to menu if either ESC or Cancel/No - f_dialog_input _input \ + f_dialog_input ret_secs \ "$msg" "$_input" "$hline" || continue + _input="$ret_secs" + # Taint-check the user's input if ! f_isinteger "${_input:-0}"; then f_dialog_msgbox \ @@ -772,14 +774,16 @@ f_dialog_input_expire_account() break ;; 4) # Enter value manually - local msg + local msg ret_secs msg=$( printf "$msg_number_of_seconds_since_epoch" \ "$( date -r 1 "+%c %Z" )" ) # Return to menu if either ESC or Cancel/No - f_dialog_input _input "$msg" \ + f_dialog_input ret_secs "$msg" \ "$_input" "$hline" || continue + _input="$ret_secs" + # Taint-check the user's input if ! f_isinteger "${_input:-0}"; then f_dialog_msgbox \ |