diff --git a/0001-Mangle-Suit-Cracklib2.9.6.patch b/0001-Mangle-Suit-Cracklib2.9.6.patch new file mode 100644 index 0000000000000000000000000000000000000000..5edb288c472374bef8a23d9f09cecce55ca0c7ac --- /dev/null +++ b/0001-Mangle-Suit-Cracklib2.9.6.patch @@ -0,0 +1,37 @@ +diff --git a/docs/technical_solution.md b/docs/technical_solution.md +index 882b75a..246506f 100644 +--- a/docs/technical_solution.md ++++ b/docs/technical_solution.md +@@ -212,8 +212,9 @@ + for (int i = 0; r_destructors[i]; i++) + { + char *a; ++ char area[STRINGSIZE]; + +- if (!(a = Mangle((char*)pw, r_destructors[i]))) ++ if (!(a = Mangle((char*)pw, r_destructors[i], area))) + { + continue; + } +@@ -336,4 +337,4 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char **argv) + } + ``` + ## 总结 +-使用以上方案,使用同一套代码校验规则,可以解决当前uos系统上遇到的密码校验规则不一致导致的一系列问题。 +\ No newline at end of file ++使用以上方案,使用同一套代码校验规则,可以解决当前uos系统上遇到的密码校验规则不一致导致的一系列问题。 +diff --git a/lib/word_check.c b/lib/word_check.c +index fc32446..ab70346 100644 +--- a/lib/word_check.c ++++ b/lib/word_check.c +@@ -394,8 +394,9 @@ int word_check(const char* pw,const char* dict_path) { + for (int i = 0; r_destructors[i]; i++) + { + char *a; ++ char area[STRINGSIZE]; + +- if (!(a = Mangle((char*)pw, r_destructors[i]))) ++ if (!(a = Mangle((char*)pw, r_destructors[i], area))) + { + continue; + } diff --git a/deepin-pw-check.spec b/deepin-pw-check.spec index dbb2db820f303d03c23af3074f5e5be5c2477fda..64cc145cb69b1b162acc0b48253af5590439529e 100644 --- a/deepin-pw-check.spec +++ b/deepin-pw-check.spec @@ -1,4 +1,4 @@ -%define anolis_release 3 +%define anolis_release 4 # Run tests in check section # disable for bootstrapping %bcond_with check @@ -15,9 +15,7 @@ URL: https://github.com/linuxdeepin/deepin-pw-check Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Patch1000: 0001-fix-for-UonioTech.patch -#uelc patch -##Patch1001: 0001-Mangle-Suit-Cracklib2.9.6.patch -#uel patch +Patch1001: 0001-Mangle-Suit-Cracklib2.9.6.patch Patch1002: 1000-deepin-pw-check-modify-password-policy.patch BuildRequires: compiler(go-compiler) @@ -50,11 +48,8 @@ this interface is designed to adapt to fingerprint, face and other authenticatio %prep %setup -q %patch1000 -p1 -%if 0%{?openeuler} +%patch1001 -p1 %patch1002 -p1 -%else -##%patch1001 -p1 -%endif %build %ifarch loongarch64 @@ -111,6 +106,9 @@ mv %{buildroot}/usr/lib64/libdeepin_pw_check.so* %{buildroot}/usr/lib/ %{_includedir}/deepin_pw_check.h %changelog +* Thu Nov 28 2024 songmingliang - 5.1.17-2.4 +- feat and fix: adapt the redhat cracklib + * Thu Jan 25 2024 liuzhilin - 5.1.17-2.3 - fix modify pam link error