Blame SOURCES/shadow-4.1.5-uflg.patch

9f90df
diff -up shadow-4.1.5/libmisc/find_new_gid.c.uflg shadow-4.1.5/libmisc/find_new_gid.c
9f90df
--- shadow-4.1.5/libmisc/find_new_gid.c.uflg	2011-07-30 01:10:27.000000000 +0200
9f90df
+++ shadow-4.1.5/libmisc/find_new_gid.c	2012-03-19 12:51:46.090554116 +0100
9f90df
@@ -68,7 +68,7 @@ int find_new_gid (bool sys_group,
9f90df
 			return -1;
9f90df
 		}
9f90df
 	} else {
9f90df
-		gid_min = (gid_t) getdef_ulong ("SYS_GID_MIN", 101UL);
9f90df
+		gid_min = (gid_t) 1;
9f90df
 		gid_max = (gid_t) getdef_ulong ("GID_MIN", 1000UL) - 1;
9f90df
 		gid_max = (gid_t) getdef_ulong ("SYS_GID_MAX", (unsigned long) gid_max);
9f90df
 		if (gid_max < gid_min) {
9f90df
@@ -100,6 +100,10 @@ int find_new_gid (bool sys_group,
9f90df
 		return 0;
9f90df
 	}
9f90df
 
9f90df
+        /* if we did not find free preffered system gid, we start to look for
9f90df
+         * one in the range assigned to dynamic system IDs */
9f90df
+        if (sys_group)
9f90df
+                gid_min = (gid_t) getdef_ulong ("SYS_GID_MIN", 101UL);
9f90df
 
9f90df
 	/*
9f90df
 	 * Search the entire group file,