import shadow-utils-4.9-6.el9

This commit is contained in:
CentOS Sources 2023-03-28 09:27:50 +00:00 committed by Stepan Oksanichenko
parent 00503f62f4
commit ce2983566c
2 changed files with 114 additions and 1 deletions

View File

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

View File

@ -1,7 +1,7 @@
Summary: Utilities for managing accounts and shadow password files Summary: Utilities for managing accounts and shadow password files
Name: shadow-utils Name: shadow-utils
Version: 4.9 Version: 4.9
Release: 5%{?dist} Release: 6%{?dist}
Epoch: 2 Epoch: 2
License: BSD and GPLv2+ License: BSD and GPLv2+
URL: https://github.com/shadow-maint/shadow URL: https://github.com/shadow-maint/shadow
@ -71,6 +71,9 @@ Patch24: shadow-4.9-groupdel-fix-sigsegv-when-passwd-does-not-exist.patch
Patch25: shadow-4.9-useradd-modify-check-ID-range-for-system-users.patch Patch25: shadow-4.9-useradd-modify-check-ID-range-for-system-users.patch
# https://github.com/shadow-maint/shadow/commit/3ec32f9975f262073f8fbdecd2bfaee4a1d3db48 # https://github.com/shadow-maint/shadow/commit/3ec32f9975f262073f8fbdecd2bfaee4a1d3db48
Patch26: shadow-4.9-subordinateio-compare-owner-ID.patch Patch26: shadow-4.9-subordinateio-compare-owner-ID.patch
# https://github.com/shadow-maint/shadow/commit/0593b330d8413e9694b5d6783bb90974c9b141c5
# https://github.com/shadow-maint/shadow/commit/45d674621918664c8736f94f862e86bddf4c3fd4
Patch27: shadow-4.9-badname-special-characters.patch
### Dependencies ### ### Dependencies ###
Requires: audit-libs >= 1.6.5 Requires: audit-libs >= 1.6.5
@ -158,6 +161,7 @@ Development files for shadow-utils-subid.
%patch24 -p1 -b .groupdel-fix-sigsegv-when-passwd-does-not-exist %patch24 -p1 -b .groupdel-fix-sigsegv-when-passwd-does-not-exist
%patch25 -p1 -b .useradd-modify-check-ID-range-for-system-users %patch25 -p1 -b .useradd-modify-check-ID-range-for-system-users
%patch26 -p1 -b .subordinateio-compare-owner-ID %patch26 -p1 -b .subordinateio-compare-owner-ID
%patch27 -p1 -b .badname-special-characters
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8 iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
cp -f doc/HOWTO.utf8 doc/HOWTO cp -f doc/HOWTO.utf8 doc/HOWTO
@ -328,6 +332,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.la
%{_libdir}/libsubid.so %{_libdir}/libsubid.so
%changelog %changelog
* Wed Sep 28 2022 Iker Pedrosa <ipedrosa@redhat.com> - 2:4.9-6
- Change "badnames" to "badname" as this is the accepted option name. Resolves: #2076819
* Thu Jul 21 2022 Iker Pedrosa <ipedrosa@redhat.com> - 2:4.9-5 * Thu Jul 21 2022 Iker Pedrosa <ipedrosa@redhat.com> - 2:4.9-5
- subordinateio: also compare the owner ID. Resolves: #2109410 - subordinateio: also compare the owner ID. Resolves: #2109410