From owner-freebsd-bugs@FreeBSD.ORG Tue Aug 10 23:40:25 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C99A16A4CE for ; Tue, 10 Aug 2004 23:40:25 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7977743D2D for ; Tue, 10 Aug 2004 23:40:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i7ANePAa090097 for ; Tue, 10 Aug 2004 23:40:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7ANePDA090096; Tue, 10 Aug 2004 23:40:25 GMT (envelope-from gnats) Resent-Date: Tue, 10 Aug 2004 23:40:25 GMT Resent-Message-Id: <200408102340.i7ANePDA090096@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Brad Killebrew Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA53216A4CE for ; Tue, 10 Aug 2004 23:38:04 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id B362443D2D for ; Tue, 10 Aug 2004 23:38:04 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i7ANc4xq074174 for ; Tue, 10 Aug 2004 23:38:04 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i7ANc4CH074173; Tue, 10 Aug 2004 23:38:04 GMT (envelope-from nobody) Message-Id: <200408102338.i7ANc4CH074173@www.freebsd.org> Date: Tue, 10 Aug 2004 23:38:04 GMT From: Brad Killebrew To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: bin/70283: adduser aborts in batch mode with comments or blank lines X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Aug 2004 23:40:25 -0000 >Number: 70283 >Category: bin >Synopsis: adduser aborts in batch mode with comments or blank lines >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 10 23:40:25 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Brad Killebrew >Release: 5.2.1-RELEASE-p9 >Organization: TXIC >Environment: FreeBSD mail.nwwomens.com 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #0: Tue Aug 10 13:50:23 CDT 2004 root@mail.nwwomens.com:/usr/obj/usr/src/sys/NWW i386 >Description: When used with the -f option (batch mode), the adduser script aborts when encountering a comment or blank line. This problem is exhibited in the following version. I have not tested other versions. $FreeBSD: src/usr.sbin/adduser/adduser.sh,v 1.20 2003/06/24 15:20:43 mtm Exp $ >How-To-Repeat: adduser -f Where contains multiple accounts to be created and also contains comments and/or blank lines. >Fix: This is corrected by changing a return to a continue in a case/esac statement. Unified diff follows. --- /usr/src/usr.sbin/adduser/adduser.sh Tue Jun 24 10:20:43 2003 +++ /usr/sbin/adduser Tue Aug 10 18:16:32 2004 @@ -563,7 +563,7 @@ while read -r fileline ; do case "$fileline" in \#*|'') - return 0 + continue ;; esac >Release-Note: >Audit-Trail: >Unformatted: