Blame SOURCES/shadow-4.6-sysugid-min-limit.patch

9f13c6
diff -up shadow-4.6/libmisc/find_new_gid.c.min-limit shadow-4.6/libmisc/find_new_gid.c
9f13c6
--- shadow-4.6/libmisc/find_new_gid.c.min-limit	2018-04-29 18:42:37.000000001 +0200
9f13c6
+++ shadow-4.6/libmisc/find_new_gid.c	2018-11-06 10:51:20.554963292 +0100
9f13c6
@@ -82,6 +82,13 @@ static int get_ranges (bool sys_group, g
9f13c6
                             (unsigned long) *max_id);
9f13c6
 			return EINVAL;
9f13c6
 		}
9f13c6
+		/*
9f13c6
+		 * Zero is reserved for root and the allocation algorithm does not
9f13c6
+		 * work right with it.
9f13c6
+		 */
9f13c6
+		if (*min_id == 0) {
9f13c6
+			*min_id = (gid_t) 1;
9f13c6
+		}
9f13c6
 	} else {
9f13c6
 		/* Non-system groups */
9f13c6
 
9f13c6
diff -up shadow-4.6/libmisc/find_new_uid.c.min-limit shadow-4.6/libmisc/find_new_uid.c
9f13c6
--- shadow-4.6/libmisc/find_new_uid.c.min-limit	2018-04-29 18:42:37.000000001 +0200
9f13c6
+++ shadow-4.6/libmisc/find_new_uid.c	2018-11-06 10:51:39.341399569 +0100
9f13c6
@@ -82,6 +82,13 @@ static int get_ranges (bool sys_user, ui
9f13c6
                             (unsigned long) *max_id);
9f13c6
 			return EINVAL;
9f13c6
 		}
9f13c6
+		/*
9f13c6
+		 * Zero is reserved for root and the allocation algorithm does not
9f13c6
+		 * work right with it.
9f13c6
+		 */
9f13c6
+		if (*min_id == 0) {
9f13c6
+			*min_id = (uid_t) 1;
9f13c6
+		}
9f13c6
 	} else {
9f13c6
 		/* Non-system users */
9f13c6