Blame SOURCES/shadow-4.6-useradd_dont_try_to_create_0_subuids.patch

24ea25
diff -up shadow-4.6/src/useradd.c.useradd_dont_try_to_create_0_subuids shadow-4.6/src/useradd.c
24ea25
--- shadow-4.6/src/useradd.c.useradd_dont_try_to_create_0_subuids	2021-11-03 11:55:00.189562187 +0100
24ea25
+++ shadow-4.6/src/useradd.c	2021-11-03 11:57:34.128658978 +0100
24ea25
@@ -2350,7 +2350,7 @@ int main (int argc, char **argv)
24ea25
 	}
24ea25
 
24ea25
 #ifdef ENABLE_SUBIDS
24ea25
-	if (is_sub_uid) {
24ea25
+	if (is_sub_uid && subuid_count != 0) {
24ea25
 		if (find_new_sub_uids(user_name, &sub_uid_start, &sub_uid_count) < 0) {
24ea25
 			fprintf (stderr,
24ea25
 			         _("%s: can't create subordinate user IDs\n"),
24ea25
@@ -2358,7 +2358,7 @@ int main (int argc, char **argv)
24ea25
 			fail_exit(E_SUB_UID_UPDATE);
24ea25
 		}
24ea25
 	}
24ea25
-	if (is_sub_gid) {
24ea25
+	if (is_sub_gid && subgid_count != 0) {
24ea25
 		if (find_new_sub_gids(user_name, &sub_gid_start, &sub_gid_count) < 0) {
24ea25
 			fprintf (stderr,
24ea25
 			         _("%s: can't create subordinate group IDs\n"),