b93bcb
MINUID and MINGID should match the values UID_MIN and GID_MIN in
b93bcb
/etc/login.defs to be consistent and to not distribute uids and gids
b93bcb
used by the linux system.
b93bcb
b93bcb
However, we can't simply change values to 1000 since on upgraded systems
b93bcb
that keep using UIDs 501+ and haven't changed /var/yp/Makefile, the Makefile
b93bcb
would actually be updated and UIDs lower than 1000 won't be included in maps.
b93bcb
b93bcb
Thus, we will read MINUID and MINGID values from /etc/login.defs
b93bcb
b93bcb
RHBZ#1004090
b93bcb
b93bcb
diff -up ypserv-2.31/scripts/ypMakefile.in.minuid ypserv-2.31/scripts/ypMakefile.in
b93bcb
--- ypserv-2.31/scripts/ypMakefile.in.minuid	2013-09-04 13:29:12.294945130 +0200
b93bcb
+++ ypserv-2.31/scripts/ypMakefile.in	2013-09-04 13:31:07.308820321 +0200
b93bcb
@@ -37,8 +37,10 @@ YPPUSH_ARGS =
b93bcb
 # the passwd file. If no entry is found, this shadow entry is
b93bcb
 # ignored.
b93bcb
 # MINGID is the lowest gid that will be included in the group maps.
b93bcb
-MINUID=500
b93bcb
-MINGID=500
b93bcb
+# You can either set values directly (e.g. MINUID=1000) or pick up
b93bcb
+# current values from /etc/login.defs
b93bcb
+MINUID=$(shell TMP=`egrep '^UID_MIN\s+[0-9]+' /etc/login.defs|sed -e 's/^UID_MIN//'` ; [ -n "$$TMP" ] && echo "$$TMP" || echo 1000)
b93bcb
+MINGID=$(shell TMP=`egrep '^GID_MIN\s+[0-9]+' /etc/login.defs|sed -e 's/^GID_MIN//'` ; [ -n "$$TMP" ] && echo "$$TMP" || echo 1000)
b93bcb
 
b93bcb
 # Don't export this uid/guid (nfsnobody).
b93bcb
 # Set to 0 if you want to