!156 [sync] PR-154: chpasswd fix coredump with s parameter

From: @openeuler-sync-bot 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
This commit is contained in:
openeuler-ci-bot 2024-12-16 12:58:39 +00:00 committed by Gitee
commit 9e16c16537
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 3 deletions

View File

@ -496,8 +496,8 @@ index 1a1a5d5..a2b6e9e 100644
#endif /* USE_YESCRYPT */ #endif /* USE_YESCRYPT */
- if (bad_s != 0) { - if (bad_s != 0) {
+#if defined(USE_SM3_CRYPT) +#if defined(USE_SM3_CRYPT)
+ if (( (0 == strcmp (crypt_method, "SM3")) + if (IS_CRYPT_METHOD("SM3")
+ && (0 == getlong(optarg, &sm3_rounds)))) { + && (0 == getlong(optarg, &sm3_rounds))) {
+ bad_s = 1; + bad_s = 1;
+ } + }
+#endif /* USE_SM3_CRYPT */ +#endif /* USE_SM3_CRYPT */

View File

@ -1,6 +1,6 @@
Name: shadow Name: shadow
Version: 4.14.3 Version: 4.14.3
Release: 3 Release: 4
Epoch: 2 Epoch: 2
License: BSD and GPLv2+ License: BSD and GPLv2+
Summary: Tools for managing accounts and shadow password files Summary: Tools for managing accounts and shadow password files
@ -191,6 +191,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.{la,a}
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Wed Dec 11 2024 beta <beta@yfqm.date> - 2:4.14.3-4
- chpasswd fix coredump with s parameter
* Wed Oct 9 2024 zhangxingrong <zhangxingrong@uniontech.com> - 2:4.14.3-3 * Wed Oct 9 2024 zhangxingrong <zhangxingrong@uniontech.com> - 2:4.14.3-3
- lib/idmapping.c: Use long constants in prctl(2) - lib/idmapping.c: Use long constants in prctl(2)
- man/lastlog: remove wrong use of keyword term - man/lastlog: remove wrong use of keyword term