Date: Tue, 2 Sep 1997 12:45:25 -0300 (EST) From: Joao Carlos Mendes Luis <Jonny@mailhost.coppe.ufrj.br> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/4452: YP Makefile changes Message-ID: <199709021545.MAA00237@gaia.coppe.ufrj.br> Resent-Message-ID: <199709021550.IAA12991@hub.freebsd.org>
index | next in thread | raw e-mail
>Number: 4452
>Category: bin
>Synopsis: /etc/ethers and NIS: Bad comment parser
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Sep 2 08:50:01 PDT 1997
>Last-Modified:
>Originator: Joao Carlos Mendes Luis
>Organization:
COPPE/UFRJ
>Release: FreeBSD 2.2-STABLE i386
>Environment:
FreeBSD 2.2, YP Server
>Description:
If one uses comments like this:
############################################
in /etc/ethers, YP Makefile thinks it's an error, instead of a comment.
>How-To-Repeat:
Edit /etc/ethers, and add the following 3 lines:
#####################################################################
# Test #
#####################################################################
>Fix:
Suggested patch to /var/yp/Makefile:
--- Makefile.old Tue Sep 2 12:38:57 1997
+++ Makefile Tue Sep 2 12:37:28 1997
@@ -190,7 +190,7 @@
@echo "Updating $@..."
@echo $@.$$$$ > $(NFILE)
$(CAT) $(ETHERS) | \
- $(AWK) '{ if ($$1 != "" && $$1 != "#" && $$1 != "+") \
+ $(AWK) '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \
print $$2"\t"$$0 }' $^ | $(DBLOAD) -i $(ETHERS) \
-o $(YPMAPDIR)/$@ - $(TMP)
@$(MV) $(TMP) $@
@@ -203,7 +203,7 @@
@echo "Updating $@..."
@echo $@.$$$$ > $(NFILE)
$(CAT) $(ETHERS) | \
- $(AWK) '{ if ($$1 != "" && $$1 != "#" && $$1 != "+") \
+ $(AWK) '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \
print $$1"\t"$$0 }' $^ | $(DBLOAD) -i $(ETHERS) \
-o $(YPMAPDIR)/$@ - $(TMP)
@$(MV) $(TMP) $@
>Audit-Trail:
>Unformatted:
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709021545.MAA00237>
