2008-09-25 11:21:57 +00:00
|
|
|
diff -up ypserv-2.19/scripts/ypMakefile.in.nfsnobody ypserv-2.19/scripts/ypMakefile.in
|
|
|
|
--- ypserv-2.19/scripts/ypMakefile.in.nfsnobody 2008-09-25 13:08:19.000000000 +0200
|
|
|
|
+++ ypserv-2.19/scripts/ypMakefile.in 2008-09-25 13:08:19.000000000 +0200
|
|
|
|
@@ -32,6 +32,11 @@ NOPUSH=true
|
2004-09-09 15:18:27 +00:00
|
|
|
MINUID=500
|
|
|
|
MINGID=500
|
|
|
|
|
|
|
|
+# Don't export this uid/guid (nfsnobody).
|
|
|
|
+# Set to 0 if you want to
|
|
|
|
+NFSNOBODYUID=65534
|
|
|
|
+NFSNOBODYGID=65534
|
|
|
|
+
|
|
|
|
# Should we merge the passwd file with the shadow file ?
|
|
|
|
# MERGE_PASSWD=true|false
|
|
|
|
MERGE_PASSWD=true
|
2008-09-25 11:21:57 +00:00
|
|
|
@@ -286,7 +291,7 @@ passwd.byname: $(PASSWD) $(SHADOW) $(YPD
|
2004-09-09 15:18:27 +00:00
|
|
|
@echo "Updating $@..."
|
|
|
|
@$(UMASK); \
|
|
|
|
$(MERGER) -p $(PASSWD) $(SHADOW) | \
|
|
|
|
- $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINUID) ) \
|
|
|
|
+ $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINUID) && $$3 != $(NFSNOBODYUID) ) \
|
|
|
|
print $$1"\t"$$0 }' | $(DBLOAD) -i $(PASSWD) \
|
|
|
|
-o $(YPMAPDIR)/$@ - $@
|
|
|
|
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
|
2008-09-25 11:21:57 +00:00
|
|
|
@@ -295,7 +300,7 @@ passwd.byuid: $(PASSWD) $(SHADOW) $(YPDI
|
2004-09-09 15:18:27 +00:00
|
|
|
@echo "Updating $@..."
|
|
|
|
@$(UMASK); \
|
|
|
|
$(MERGER) -p $(PASSWD) $(SHADOW) | \
|
|
|
|
- $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINUID) ) \
|
|
|
|
+ $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINUID) && $$3 != $(NFSNOBODYUID) ) \
|
|
|
|
print $$3"\t"$$0 }' | $(DBLOAD) -i $(PASSWD) \
|
|
|
|
-o $(YPMAPDIR)/$@ - $@
|
|
|
|
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
|
2008-09-25 11:21:57 +00:00
|
|
|
@@ -309,7 +314,7 @@ else
|
2004-09-09 15:18:27 +00:00
|
|
|
passwd.byname: $(PASSWD) $(YPDIR)/Makefile
|
|
|
|
@echo "Updating $@..."
|
|
|
|
@$(UMASK); \
|
|
|
|
- $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINUID) ) \
|
|
|
|
+ $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINUID) && $$3 != $(NFSNOBODYUID) ) \
|
|
|
|
print $$1"\t"$$0 }' $(PASSWD) | $(DBLOAD) -i $(PASSWD) \
|
|
|
|
-o $(YPMAPDIR)/$@ - $@
|
|
|
|
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
|
2008-09-25 11:21:57 +00:00
|
|
|
@@ -317,7 +322,7 @@ passwd.byname: $(PASSWD) $(YPDIR)/Makefi
|
2004-09-09 15:18:27 +00:00
|
|
|
passwd.byuid: $(PASSWD) $(YPDIR)/Makefile
|
|
|
|
@echo "Updating $@..."
|
|
|
|
@$(UMASK); \
|
|
|
|
- $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINUID) ) \
|
|
|
|
+ $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINUID) && $$3 != $(NFSNOBODYUID) ) \
|
|
|
|
print $$3"\t"$$0 }' $(PASSWD) | $(DBLOAD) -i $(PASSWD) \
|
|
|
|
-o $(YPMAPDIR)/$@ - $@
|
|
|
|
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
|
2008-09-25 11:21:57 +00:00
|
|
|
@@ -326,7 +331,7 @@ shadow.byname: $(SHADOW) $(YPDIR)/Makefi
|
2004-09-09 15:18:27 +00:00
|
|
|
@echo "Updating $@..."
|
|
|
|
@$(UMASK); \
|
|
|
|
$(AWK) -F: '{ if (FILENAME ~ /shadow$$/) { \
|
|
|
|
- if (UID[$$1] >= $(MINUID) ) print $$1"\t"$$0; \
|
|
|
|
+ if (UID[$$1] >= $(MINUID) && UID[$$1] != $(NFSNOBODYUID)) print $$1"\t"$$0; \
|
|
|
|
} else UID[$$1] = $$3; }' $(PASSWD) $(SHADOW) \
|
|
|
|
| $(DBLOAD) -s -i $(SHADOW) -o $(YPMAPDIR)/$@ - $@
|
|
|
|
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
|
2008-09-25 11:21:57 +00:00
|
|
|
@@ -345,7 +350,7 @@ group.byname: $(GROUP) $(GSHADOW) $(YPDI
|
2004-09-09 15:18:27 +00:00
|
|
|
@echo "Updating $@..."
|
|
|
|
@$(UMASK); \
|
|
|
|
$(MERGER) -g $(GROUP) $(GSHADOW) | \
|
|
|
|
- $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINGID) ) \
|
|
|
|
+ $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINGID) && $$3 != $(NFSNOBODYGID) ) \
|
|
|
|
print $$1"\t"$$0 }' | $(DBLOAD) -i $(GROUP) -o $(YPMAPDIR)/$@ - $@
|
|
|
|
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
|
|
|
|
|
2008-09-25 11:21:57 +00:00
|
|
|
@@ -353,7 +358,7 @@ group.bygid: $(GROUP) $(GSHADOW) $(YPDIR
|
2004-09-09 15:18:27 +00:00
|
|
|
@echo "Updating $@..."
|
|
|
|
@$(UMASK); \
|
|
|
|
$(MERGER) -g $(GROUP) $(GSHADOW) | \
|
|
|
|
- $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINGID) ) \
|
|
|
|
+ $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINGID) && $$3 != $(NFSNOBODYGID) ) \
|
|
|
|
print $$3"\t"$$0 }' | $(DBLOAD) -i $(GROUP) -o $(YPMAPDIR)/$@ - $@
|
|
|
|
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
|
|
|
|
|
2008-09-25 11:21:57 +00:00
|
|
|
@@ -362,7 +367,7 @@ else
|
2004-09-09 15:18:27 +00:00
|
|
|
group.byname: $(GROUP) $(YPDIR)/Makefile
|
|
|
|
@echo "Updating $@..."
|
|
|
|
@$(UMASK); \
|
|
|
|
- $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINGID) ) \
|
|
|
|
+ $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINGID) && $$3 != $(NFSNOBODYGID) ) \
|
|
|
|
print $$1"\t"$$0 }' $(GROUP) \
|
|
|
|
| $(DBLOAD) -i $(GROUP) -o $(YPMAPDIR)/$@ - $@
|
|
|
|
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
|
2008-09-25 11:21:57 +00:00
|
|
|
@@ -370,7 +375,7 @@ group.byname: $(GROUP) $(YPDIR)/Makefile
|
2004-09-09 15:18:27 +00:00
|
|
|
group.bygid: $(GROUP) $(YPDIR)/Makefile
|
|
|
|
@echo "Updating $@..."
|
|
|
|
@$(UMASK); \
|
|
|
|
- $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINGID) ) \
|
|
|
|
+ $(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$3 >= $(MINGID) && $$3 != $(NFSNOBODYGID) ) \
|
|
|
|
print $$3"\t"$$0 }' $(GROUP) \
|
|
|
|
| $(DBLOAD) -i $(GROUP) -o $(YPMAPDIR)/$@ - $@
|
|
|
|
-@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@
|