diff options
author | wpaul <wpaul@FreeBSD.org> | 1999-08-22 15:34:47 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1999-08-22 15:34:47 +0000 |
commit | 6adf54a509f791793d10a647ca50348e8294771a (patch) | |
tree | 0a81c550ecbad9912031990af6a2779e86c6ffe2 /usr.sbin/ypserv | |
parent | 1fc883b9da641978f3d0a83dc297af338dd9a441 (diff) | |
download | FreeBSD-src-6adf54a509f791793d10a647ca50348e8294771a.zip FreeBSD-src-6adf54a509f791793d10a647ca50348e8294771a.tar.gz |
Modify yp_mkdb so that it only checks for bogus '+' and '-' characters
in source input if the -f flag is used, and modify Makefile.yp to only
use -f for the passwd, master.passwd and group maps. These should be
the only ones for which the + and - characters have special meaning
that make it important for us to avoid letting them into any of the map
databases. In some cases (namely the automounter maps) we have to allow
at least the - character through in order to create the map properly.
This closes PR #8699.
Diffstat (limited to 'usr.sbin/ypserv')
-rw-r--r-- | usr.sbin/ypserv/Makefile.yp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/ypserv/Makefile.yp b/usr.sbin/ypserv/Makefile.yp index a72f947..cd678e1 100644 --- a/usr.sbin/ypserv/Makefile.yp +++ b/usr.sbin/ypserv/Makefile.yp @@ -1,7 +1,7 @@ # # Makefile for the NIS databases # -# $Id: Makefile.yp,v 1.25 1998/07/22 06:01:13 phk Exp $ +# $Id: Makefile.yp,v 1.26 1999/06/24 17:19:35 n_hibma Exp $ # # This Makefile should only be run on the NIS master server of a domain. # All updated maps will be pushed to all NIS slave servers listed in the @@ -479,7 +479,7 @@ passwd.byname: $(PASSWD) @echo "Updating $@..." $(CAT) $(PASSWD) | \ $(AWK) -F: '{ if ($$1 != "+") print $$1"\t"$$0 }' $^ \ - | $(DBLOAD) -i $(PASSWD) -o $(YPMAPDIR)/$@ - $(TMP); \ + | $(DBLOAD) -f -i $(PASSWD) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi @@ -490,7 +490,7 @@ passwd.byuid: $(PASSWD) @echo "Updating $@..." $(CAT) $(PASSWD) | \ $(AWK) -F: '{ if ($$1 != "+") print $$3"\t"$$0 }' $^ \ - | $(DBLOAD) -i $(PASSWD) -o $(YPMAPDIR)/$@ - $(TMP); \ + | $(DBLOAD) -f -i $(PASSWD) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi @@ -502,7 +502,7 @@ group.byname: $(GROUP) @echo "Updating $@..." $(CAT) $(GROUP) | \ $(AWK) -F: '{ if ($$1 != "+") print $$1"\t"$$0 }' $^ \ - | $(DBLOAD) -i $(GROUP) -o $(YPMAPDIR)/$@ - $(TMP); \ + | $(DBLOAD) -f -i $(GROUP) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi @@ -513,7 +513,7 @@ group.bygid: $(GROUP) @echo "Updating $@..." $(CAT) $(GROUP) | \ $(AWK) -F: '{ if ($$1 != "+") print $$3"\t"$$0 }' $^ \ - | $(DBLOAD) -i $(GROUP) -o $(YPMAPDIR)/$@ - $(TMP); \ + | $(DBLOAD) -f -i $(GROUP) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi @@ -538,7 +538,7 @@ master.passwd.byname: $(MASTER) .else $(CAT) $(MASTER) | \ $(AWK) -F: '{ if ($$1 != "+") print $$1"\t"$$0 }' $^ \ - | $(DBLOAD) ${S} -i $(MASTER) -o $(YPMAPDIR)/$@ - $(TMP); \ + | $(DBLOAD) ${S} -f -i $(MASTER) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi @@ -553,7 +553,7 @@ master.passwd.byuid: $(MASTER) .else $(CAT) $(MASTER) | \ $(AWK) -F: '{ if ($$1 != "+") print $$3"\t"$$0 }' $^ \ - | $(DBLOAD) ${S} -i $(MASTER) -o $(YPMAPDIR)/$@ - $(TMP); \ + | $(DBLOAD) ${S} -f -i $(MASTER) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi |