From 324f8517e660b1d0f25931e676ccb759ec4b513a Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 13 May 2025 14:22:19 +0000 Subject: [PATCH] import UBI shadow-utils-4.9-12.el9 --- SOURCES/shadow-4.9-salt-remove-rounds.patch | 24 +++++++++++++++++++++ SPECS/shadow-utils.spec | 8 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 SOURCES/shadow-4.9-salt-remove-rounds.patch diff --git a/SOURCES/shadow-4.9-salt-remove-rounds.patch b/SOURCES/shadow-4.9-salt-remove-rounds.patch new file mode 100644 index 0000000..eca3de9 --- /dev/null +++ b/SOURCES/shadow-4.9-salt-remove-rounds.patch @@ -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. */ diff --git a/SPECS/shadow-utils.spec b/SPECS/shadow-utils.spec index 402ac4b..243ecc0 100644 --- a/SPECS/shadow-utils.spec +++ b/SPECS/shadow-utils.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing accounts and shadow password files Name: shadow-utils Version: 4.9 -Release: 10%{?dist} +Release: 12%{?dist} Epoch: 2 License: BSD and GPLv2+ URL: https://github.com/shadow-maint/shadow @@ -82,6 +82,8 @@ Patch29: shadow-4.9-skip-over-reserved-ids.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 ### Requires: audit-libs >= 1.6.5 @@ -174,6 +176,7 @@ Development files for shadow-utils-subid. %patch29 -p1 -b .skip-over-reserved-ids %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 cp -f doc/HOWTO.utf8 doc/HOWTO @@ -344,6 +347,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.la %{_libdir}/libsubid.so %changelog +* Mon Nov 4 2024 Iker Pedrosa - 2:4.9-12 +- salt: remove rounds from salt string. Resolves: RHEL-58978 + * Fri Sep 13 2024 Iker Pedrosa - 2:4.9-10 - Disable sssd integration by default. Resolves: RHEL-56352