From owner-freebsd-bugs Wed Dec 15 8:40: 9 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 36BE5153C9 for ; Wed, 15 Dec 1999 08:40:03 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id IAA76978; Wed, 15 Dec 1999 08:40:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from roma.coe.ufrj.br (roma.coe.ufrj.br [146.164.53.65]) by hub.freebsd.org (Postfix) with ESMTP id 1C06015241 for ; Wed, 15 Dec 1999 08:39:56 -0800 (PST) (envelope-from jonny@jonny.eng.br) Received: (from root@localhost) by roma.coe.ufrj.br (8.9.3/8.9.3) id OAA04736; Wed, 15 Dec 1999 14:39:53 -0200 (EDT) (envelope-from jonny) Message-Id: <199912151639.OAA04736@roma.coe.ufrj.br> Date: Wed, 15 Dec 1999 14:39:53 -0200 (EDT) From: Joao Carlos Mendes Luis Reply-To: jonny@jonny.eng.br To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/15497: NIS and comments in /etc/passwd, /etc/group Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 15497 >Category: bin >Synopsis: NIS does not deal well with comments >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: Wed Dec 15 08:40:02 PST 1999 >Closed-Date: >Last-Modified: >Originator: Joao Carlos Mendes Luis >Release: FreeBSD 3.4-RC i386 >Organization: COPPE/UFRJ >Environment: FreeBSD NIS server, using /etc/group and /etc/master.passwd as source >Description: If you use comments (#) in those files, NIS tries to create tables with them, instead of ignoring them. >How-To-Repeat: Put a # comment in /etc/group, cd /var/yp, make >Fix: This patch removes lines with comments before making NIS databases. --- Makefile.antes Wed Dec 15 14:15:41 1999 +++ Makefile Wed Dec 15 14:37:56 1999 @@ -479,7 +479,7 @@ passwd.byname: $(PASSWD) @echo "Updating $@..." $(CAT) $(PASSWD) | \ - $(AWK) -F: '{ if ($$1 != "+") print $$1"\t"$$0 }' $^ \ + $(AWK) -F: '{ if ($$1 != "+" && $$1 !~ "^#.*") print $$1"\t"$$0 }' $^ \ | $(DBLOAD) -f -i $(PASSWD) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c @@ -490,7 +490,7 @@ passwd.byuid: $(PASSWD) @echo "Updating $@..." $(CAT) $(PASSWD) | \ - $(AWK) -F: '{ if ($$1 != "+") print $$3"\t"$$0 }' $^ \ + $(AWK) -F: '{ if ($$1 != "+" && $$1 !~ "^#.*") print $$3"\t"$$0 }' $^ \ | $(DBLOAD) -f -i $(PASSWD) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c @@ -502,7 +502,7 @@ group.byname: $(GROUP) @echo "Updating $@..." $(CAT) $(GROUP) | \ - $(AWK) -F: '{ if ($$1 != "+") print $$1"\t"$$0 }' $^ \ + $(AWK) -F: '{ if ($$1 != "+" && $$1 !~ "^#.*") print $$1"\t"$$0 }' $^ \ | $(DBLOAD) -f -i $(GROUP) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c @@ -513,7 +513,7 @@ group.bygid: $(GROUP) @echo "Updating $@..." $(CAT) $(GROUP) | \ - $(AWK) -F: '{ if ($$1 != "+") print $$3"\t"$$0 }' $^ \ + $(AWK) -F: '{ if ($$1 != "+" && $$1 !~ "^#.*") print $$3"\t"$$0 }' $^ \ | $(DBLOAD) -f -i $(GROUP) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c @@ -538,7 +538,7 @@ @echo "Master.passwd source file not found -- skipping" .else $(CAT) $(MASTER) | \ - $(AWK) -F: '{ if ($$1 != "+") print $$1"\t"$$0 }' $^ \ + $(AWK) -F: '{ if ($$1 != "+" && $$1 !~ "^#.*") print $$1"\t"$$0 }' $^ \ | $(DBLOAD) ${S} -f -i $(MASTER) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c @@ -553,7 +553,7 @@ @echo "Master.passwd source file not found -- skipping" .else $(CAT) $(MASTER) | \ - $(AWK) -F: '{ if ($$1 != "+") print $$3"\t"$$0 }' $^ \ + $(AWK) -F: '{ if ($$1 != "+" && $$1 !~ "^#.*") print $$3"\t"$$0 }' $^ \ | $(DBLOAD) ${S} -f -i $(MASTER) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message