Date: Mon, 11 Oct 1999 15:52:17 -0600 (MDT) From: howard@ee.utah.edu To: FreeBSD-gnats-submit@freebsd.org Subject: misc/14269: update /var/yp/Makefile Message-ID: <19991011215217.2A4A25411@ee.utah.edu>
index | next in thread | raw e-mail
>Number: 14269
>Category: misc
>Synopsis: NIS passwd and group maps do not clean out 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: Mon Oct 11 15:00:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator: Walt Howard
>Release: FreeBSD 3.3-RELEASE i386
>Organization:
University of Utah Electrical Engineering Dept
>Environment:
same as release, plus running as a nis_server
>Description:
Somewhere in the recent past, FreeBSD started allowing comment
lines in /etc/passwd and /etc/group. /var/yp/Makefile was not
updated to remove the comment lines before making a NIS map
from those files.
>How-To-Repeat:
cd /var/yp; mkdir domain; cd domain
make -f ../Makefile group
: notice the complaints about duplicate key '#'
>Fix:
Here is a context diff on /var/yp/Makefile
*** /var/yp/Makefile.orig Thu Sep 16 16:48:34 1999
--- /var/yp/Makefile.patch Mon Oct 11 14:54:08 1999
***************
*** 478,484 ****
passwd.byname: $(PASSWD)
@echo "Updating $@..."
$(CAT) $(PASSWD) | \
! $(AWK) -F: '{ if ($$1 != "+") print $$1"\t"$$0 }' $^ \
| $(DBLOAD) -f -i $(PASSWD) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c
--- 478,485 ----
passwd.byname: $(PASSWD)
@echo "Updating $@..."
$(CAT) $(PASSWD) | \
! $(AWK) -F: '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \
! print $$1"\t"$$0 }' $^ \
| $(DBLOAD) -f -i $(PASSWD) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c
***************
*** 489,495 ****
passwd.byuid: $(PASSWD)
@echo "Updating $@..."
$(CAT) $(PASSWD) | \
! $(AWK) -F: '{ if ($$1 != "+") print $$3"\t"$$0 }' $^ \
| $(DBLOAD) -f -i $(PASSWD) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c
--- 490,497 ----
passwd.byuid: $(PASSWD)
@echo "Updating $@..."
$(CAT) $(PASSWD) | \
! $(AWK) -F: '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \
! print $$3"\t"$$0 }' $^ \
| $(DBLOAD) -f -i $(PASSWD) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c
***************
*** 501,507 ****
group.byname: $(GROUP)
@echo "Updating $@..."
$(CAT) $(GROUP) | \
! $(AWK) -F: '{ if ($$1 != "+") print $$1"\t"$$0 }' $^ \
| $(DBLOAD) -f -i $(GROUP) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c
--- 503,510 ----
group.byname: $(GROUP)
@echo "Updating $@..."
$(CAT) $(GROUP) | \
! $(AWK) -F: '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \
! print $$1"\t"$$0 }' $^ \
| $(DBLOAD) -f -i $(GROUP) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c
***************
*** 512,518 ****
group.bygid: $(GROUP)
@echo "Updating $@..."
$(CAT) $(GROUP) | \
! $(AWK) -F: '{ if ($$1 != "+") print $$3"\t"$$0 }' $^ \
| $(DBLOAD) -f -i $(GROUP) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c
--- 515,522 ----
group.bygid: $(GROUP)
@echo "Updating $@..."
$(CAT) $(GROUP) | \
! $(AWK) -F: '{ if ($$1 != "" && $$1 !~ "^#.*" && $$1 != "+") \
! print $$3"\t"$$0 }' $^ \
| $(DBLOAD) -f -i $(GROUP) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c
>Release-Note:
>Audit-Trail:
>Unformatted:
Walt Howard
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991011215217.2A4A25411>
