!69 The SM3 patch is compatible with version 4.13

From: @yunjia_w 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
This commit is contained in:
openeuler-ci-bot 2023-02-18 03:22:19 +00:00 committed by Gitee
commit b46f20bf82
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 16 additions and 13 deletions

View File

@ -25,7 +25,7 @@ index 924254a..dde1de8 100644
[AS_HELP_STRING([--with-sha-crypt], [allow the SHA256 and SHA512 password encryption algorithms @<:@default=yes@:>@])], [AS_HELP_STRING([--with-sha-crypt], [allow the SHA256 and SHA512 password encryption algorithms @<:@default=yes@:>@])],
[with_sha_crypt=$withval], [with_sha_crypt=yes]) [with_sha_crypt=$withval], [with_sha_crypt=yes])
+AC_ARG_WITH(sm3-crypt, +AC_ARG_WITH(sm3-crypt,
+ [AC_HELP_STRING([--with-sm3-crypt], [allow the SM3 password encryption algorithms @<:@default=yes@:>@])], + [AS_HELP_STRING([--with-sm3-crypt], [allow the SM3 password encryption algorithms @<:@default=yes@:>@])],
+ [with_sm3_crypt=$withval], [with_sm3_crypt=yes]) + [with_sm3_crypt=$withval], [with_sm3_crypt=yes])
AC_ARG_WITH(bcrypt, AC_ARG_WITH(bcrypt,
[AS_HELP_STRING([--with-bcrypt], [allow the bcrypt password encryption algorithm @<:@default=no@:>@])], [AS_HELP_STRING([--with-bcrypt], [allow the bcrypt password encryption algorithm @<:@default=no@:>@])],
@ -557,7 +557,7 @@ index 48d5178..9003c18 100644
&&(!IS_CRYPT_METHOD("SHA512")) &&(!IS_CRYPT_METHOD("SHA512"))
#endif /* USE_SHA_CRYPT */ #endif /* USE_SHA_CRYPT */
+#ifdef USE_SM3_CRYPT +#ifdef USE_SM3_CRYPT
+ && (0 != strcmp (crypt_method, "SM3")) + &&(!IS_CRYPT_METHOD("SM3"))
+#endif /* USE_SM3_CRYPT */ +#endif /* USE_SM3_CRYPT */
#ifdef USE_BCRYPT #ifdef USE_BCRYPT
&&(!IS_CRYPT_METHOD("BCRYPT")) &&(!IS_CRYPT_METHOD("BCRYPT"))
@ -567,7 +567,7 @@ index 48d5178..9003c18 100644
} }
#endif /* USE_YESCRYPT */ #endif /* USE_YESCRYPT */
+#if defined(USE_SM3_CRYPT) +#if defined(USE_SM3_CRYPT)
+ if (0 == strcmp (crypt_method, "SM3")) { + if (IS_CRYPT_METHOD("SM3")) {
+ arg = &sm3_rounds; + arg = &sm3_rounds;
+ } + }
+#endif /* USE_SM3_CRYPT */ +#endif /* USE_SM3_CRYPT */

View File

@ -1,6 +1,6 @@
Name: shadow Name: shadow
Version: 4.13 Version: 4.13
Release: 1 Release: 2
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
@ -186,6 +186,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.{la,a}
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Thu Feb 9 2023 yunjia_w<yunjia.wang@huawei.com> - 2:4.13-2
- SM3 patch is compatible with version 4.13
* Wed Feb 8 2023 yunjia_w<yunjia.wang@huawei.com> - 2:4.13-1 * Wed Feb 8 2023 yunjia_w<yunjia.wang@huawei.com> - 2:4.13-1
- update version to 4.13 - update version to 4.13