import CS shadow-utils-4.9-12.el9

This commit is contained in:
eabdullin 2025-03-11 08:12:00 +00:00
parent 8284ac187c
commit c96363b066
3 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -up shadow-4.9/lib/sssd.c.disable-sssd shadow-4.9/lib/sssd.c
--- shadow-4.9/lib/sssd.c.disable-sssd 2024-09-13 10:28:17.144473113 +0200
+++ shadow-4.9/lib/sssd.c 2024-09-13 10:29:07.135621104 +0200
@@ -16,7 +16,7 @@
int sssd_flush_cache (int dbflags)
{
int status, code, rv;
- const char *cmd = "/usr/sbin/sss_cache";
+ const char *cmd = "/usr/sbin/sss_cache_shadow_utils";
char *sss_cache_args = NULL;
const char *spawnedArgs[] = {"sss_cache", NULL, NULL};
const char *spawnedEnv[] = {NULL};

View File

@ -0,0 +1,24 @@
diff --git a/libmisc/salt.c b/libmisc/salt.c
index efef4e59..823b093d 100644
--- a/libmisc/salt.c
+++ b/libmisc/salt.c
@@ -439,6 +439,19 @@ static /*@observer@*/const char *gensalt (size_t salt_size)
exit (1);
}
+ char *pos = strstr(retval, "$rounds=");
+ if (pos != NULL) {
+ char str[128];
+ int len;
+ int ret;
+
+ ret = sprintf(str, "%lu", rounds);
+ if (ret > 0) {
+ len = strlen("$rounds=") + strlen(str);
+ memmove(pos, pos + len, strlen(pos + len) + 1);
+ }
+ }
+
return retval;
#else /* USE_XCRYPT_GENSALT */
/* Check if the result buffer is long enough. */

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: 9%{?dist} Release: 12%{?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
@ -80,6 +80,10 @@ Patch28: shadow-4.9-useradd-check-if-subid-range-exists.patch
Patch29: shadow-4.9-skip-over-reserved-ids.patch Patch29: shadow-4.9-skip-over-reserved-ids.patch
# https://github.com/shadow-maint/shadow/commit/65c88a43a23c2391dcc90c0abda3e839e9c57904 # https://github.com/shadow-maint/shadow/commit/65c88a43a23c2391dcc90c0abda3e839e9c57904
Patch30: shadow-4.9-gpasswd-fix-password-leak.patch Patch30: shadow-4.9-gpasswd-fix-password-leak.patch
# Downstream only patch
Patch31: shadow-4.9-disable-sssd.patch
# Downstream only patch
Patch32: shadow-4.9-salt-remove-rounds.patch
### Dependencies ### ### Dependencies ###
Requires: audit-libs >= 1.6.5 Requires: audit-libs >= 1.6.5
@ -171,6 +175,8 @@ Development files for shadow-utils-subid.
%patch28 -p1 -b .useradd-check-if-subid-range-exists %patch28 -p1 -b .useradd-check-if-subid-range-exists
%patch29 -p1 -b .skip-over-reserved-ids %patch29 -p1 -b .skip-over-reserved-ids
%patch30 -p1 -b .gpasswd-fix-password-leak %patch30 -p1 -b .gpasswd-fix-password-leak
%patch31 -p1 -b .disable-sssd
%patch32 -p1 -b .salt-remove-rounds
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
@ -341,6 +347,12 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.la
%{_libdir}/libsubid.so %{_libdir}/libsubid.so
%changelog %changelog
* Mon Nov 4 2024 Iker Pedrosa <ipedrosa@redhat.com> - 2:4.9-12
- salt: remove rounds from salt string. Resolves: RHEL-58978
* Fri Sep 13 2024 Iker Pedrosa <ipedrosa@redhat.com> - 2:4.9-10
- Disable sssd integration by default. Resolves: RHEL-56352
* Wed Jul 3 2024 Iker Pedrosa <ipedrosa@redhat.com> - 2:4.9-9 * Wed Jul 3 2024 Iker Pedrosa <ipedrosa@redhat.com> - 2:4.9-9
- login.defs: Update SHA_CRYPT_MAX_ROUNDS from 5000 to 100000. Resolves: RHEL-40195 - login.defs: Update SHA_CRYPT_MAX_ROUNDS from 5000 to 100000. Resolves: RHEL-40195