From owner-svn-src-head@FreeBSD.ORG Sat Jun 8 18:08:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D6F181FD; Sat, 8 Jun 2013 18:08:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AF2B51E29; Sat, 8 Jun 2013 18:08:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r58I8IPH053861; Sat, 8 Jun 2013 18:08:18 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r58I8IVT053859; Sat, 8 Jun 2013 18:08:18 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201306081808.r58I8IVT053859@svn.freebsd.org> From: Devin Teske Date: Sat, 8 Jun 2013 18:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251544 - head/usr.sbin/bsdconfig/usermgmt/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jun 2013 18:08:18 -0000 Author: dteske Date: Sat Jun 8 18:08:17 2013 New Revision: 251544 URL: http://svnweb.freebsd.org/changeset/base/251544 Log: 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). Modified: head/usr.sbin/bsdconfig/usermgmt/share/group_input.subr head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Modified: head/usr.sbin/bsdconfig/usermgmt/share/group_input.subr ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/group_input.subr Sat Jun 8 17:46:39 2013 (r251543) +++ head/usr.sbin/bsdconfig/usermgmt/share/group_input.subr Sat Jun 8 18:08:17 2013 (r251544) @@ -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 Modified: head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Sat Jun 8 17:46:39 2013 (r251543) +++ head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Sat Jun 8 18:08:17 2013 (r251544) @@ -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