Blame SOURCES/shadow-4.9-badname-special-characters.patch

4cce76
diff -up shadow-4.9/man/usermod.8.xml.badname-special-characters shadow-4.9/man/usermod.8.xml
4cce76
--- shadow-4.9/man/usermod.8.xml.badname-special-characters	2021-07-22 23:55:35.000000000 +0200
4cce76
+++ shadow-4.9/man/usermod.8.xml	2022-09-26 16:32:46.214519257 +0200
4cce76
@@ -110,7 +110,7 @@
4cce76
       </varlistentry>
4cce76
       <varlistentry>
4cce76
 	<term>
4cce76
-	  <option>-b</option>, <option>--badnames</option>
4cce76
+	  <option>-b</option>, <option>--badname</option>
4cce76
 	</term>
4cce76
 	<listitem>
4cce76
 	  <para>
4cce76
diff -up shadow-4.9/src/newusers.c.badname-special-characters shadow-4.9/src/newusers.c
4cce76
--- shadow-4.9/src/newusers.c.badname-special-characters	2021-07-22 23:55:35.000000000 +0200
4cce76
+++ shadow-4.9/src/newusers.c	2022-09-26 16:33:31.331869855 +0200
4cce76
@@ -139,7 +139,7 @@ static void usage (int status)
4cce76
 	                  "\n"
4cce76
 	                  "Options:\n"),
4cce76
 	                Prog);
4cce76
-	(void) fputs (_("  -b, --badnames                allow bad names\n"), usageout);
4cce76
+	(void) fputs (_("  -b, --badname                 allow bad names\n"), usageout);
4cce76
 #ifndef USE_PAM
4cce76
 	(void) fprintf (usageout,
4cce76
 	                _("  -c, --crypt-method METHOD     the crypt method (one of %s)\n"),
4cce76
@@ -406,7 +406,7 @@ static int add_user (const char *name, u
4cce76
 	/* Check if this is a valid user name */
4cce76
 	if (!is_valid_user_name (name)) {
4cce76
 		fprintf (stderr,
4cce76
-		         _("%s: invalid user name '%s'\n"),
4cce76
+		         _("%s: invalid user name '%s': use --badname to ignore\n"),
4cce76
 		         Prog, name);
4cce76
 		return -1;
4cce76
 	}
4cce76
@@ -634,7 +634,7 @@ static void process_flags (int argc, cha
4cce76
         int bad_s;
4cce76
 #endif				/* USE_SHA_CRYPT || USE_BCRYPT || USE_YESCRYPT */
4cce76
 	static struct option long_options[] = {
4cce76
-		{"badnames",     no_argument,       NULL, 'b'},
4cce76
+		{"badname",      no_argument,       NULL, 'b'},
4cce76
 #ifndef USE_PAM
4cce76
 		{"crypt-method", required_argument, NULL, 'c'},
4cce76
 #endif				/* !USE_PAM */
4cce76
diff -up shadow-4.9/src/pwck.c.badname-special-characters shadow-4.9/src/pwck.c
4cce76
--- shadow-4.9/src/pwck.c.badname-special-characters	2022-09-26 16:32:46.208519211 +0200
4cce76
+++ shadow-4.9/src/pwck.c	2022-09-26 16:32:46.214519257 +0200
4cce76
@@ -151,7 +151,7 @@ static /*@noreturn@*/void usage (int sta
4cce76
 		                  "Options:\n"),
4cce76
 		                Prog);
4cce76
 	}
4cce76
-	(void) fputs (_("  -b, --badnames                allow bad names\n"), usageout);
4cce76
+	(void) fputs (_("  -b, --badname                 allow bad names\n"), usageout);
4cce76
 	(void) fputs (_("  -h, --help                    display this help message and exit\n"), usageout);
4cce76
 	(void) fputs (_("  -q, --quiet                   report errors only\n"), usageout);
4cce76
 	(void) fputs (_("  -r, --read-only               display errors and warnings\n"
4cce76
@@ -176,7 +176,7 @@ static void process_flags (int argc, cha
4cce76
 {
4cce76
 	int c;
4cce76
 	static struct option long_options[] = {
4cce76
-		{"badnames",  no_argument,       NULL, 'b'},
4cce76
+		{"badname",   no_argument,       NULL, 'b'},
4cce76
 		{"help",      no_argument,       NULL, 'h'},
4cce76
 		{"quiet",     no_argument,       NULL, 'q'},
4cce76
 		{"read-only", no_argument,       NULL, 'r'},
4cce76
@@ -493,7 +493,8 @@ static void check_pw_file (int *errors,
4cce76
 		 */
4cce76
 
4cce76
 		if (!is_valid_user_name (pwd->pw_name)) {
4cce76
-			printf (_("invalid user name '%s'\n"), pwd->pw_name);
4cce76
+			printf (_("invalid user name '%s': use --badname to ignore\n"),
4cce76
+					pwd->pw_name);
4cce76
 			*errors += 1;
4cce76
 		}
4cce76
 
4cce76
diff -up shadow-4.9/src/useradd.c.badname-special-characters shadow-4.9/src/useradd.c
4cce76
--- shadow-4.9/src/useradd.c.badname-special-characters	2022-09-26 16:32:46.212519242 +0200
4cce76
+++ shadow-4.9/src/useradd.c	2022-09-26 16:32:46.214519257 +0200
4cce76
@@ -852,7 +852,7 @@ static void usage (int status)
4cce76
 	                  "\n"
4cce76
 	                  "Options:\n"),
4cce76
 	                Prog, Prog, Prog);
4cce76
-	(void) fputs (_("      --badnames                do not check for bad names\n"), usageout);
4cce76
+	(void) fputs (_("      --badname                 do not check for bad names\n"), usageout);
4cce76
 	(void) fputs (_("  -b, --base-dir BASE_DIR       base directory for the home directory of the\n"
4cce76
 	                "                                new account\n"), usageout);
4cce76
 #ifdef WITH_BTRFS
4cce76
@@ -1119,7 +1119,7 @@ static void process_flags (int argc, cha
4cce76
 #ifdef WITH_BTRFS
4cce76
 			{"btrfs-subvolume-home", no_argument, NULL, 200},
4cce76
 #endif
4cce76
-			{"badnames",       no_argument,       NULL, 201},
4cce76
+			{"badname",        no_argument,       NULL, 201},
4cce76
 			{"comment",        required_argument, NULL, 'c'},
4cce76
 			{"home-dir",       required_argument, NULL, 'd'},
4cce76
 			{"defaults",       no_argument,       NULL, 'D'},
4cce76
diff -up shadow-4.9/src/usermod.c.badname-special-characters shadow-4.9/src/usermod.c
4cce76
--- shadow-4.9/src/usermod.c.badname-special-characters	2022-09-26 16:32:46.215519265 +0200
4cce76
+++ shadow-4.9/src/usermod.c	2022-09-26 16:33:52.274032599 +0200
4cce76
@@ -418,7 +418,7 @@ static /*@noreturn@*/void usage (int sta
4cce76
 	                  "\n"
4cce76
 	                  "Options:\n"),
4cce76
 	                Prog);
4cce76
-	(void) fputs (_("  -b, --badnames                allow bad names\n"), usageout);
4cce76
+	(void) fputs (_("  -b, --badname                 allow bad names\n"), usageout);
4cce76
 	(void) fputs (_("  -c, --comment COMMENT         new value of the GECOS field\n"), usageout);
4cce76
 	(void) fputs (_("  -d, --home HOME_DIR           new home directory for the user account\n"), usageout);
4cce76
 	(void) fputs (_("  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE\n"), usageout);