bin/70283: adduser aborts in batch mode with comments or blank lines
Brad Killebrew
brad at txic.net
Tue Aug 10 16:40:25 PDT 2004
>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 at 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 <batchfile>
Where <batchfile> 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:
More information about the freebsd-bugs
mailing list