Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
455f917dd1
!36 【Mainline】Update to 2.9.11
From: @yixiangzhike 
Reviewed-by: @houmingyong 
Signed-off-by: @houmingyong
2023-07-14 06:38:35 +00:00
yixiangzhike
fba7ecba0a Update to 2.9.11 2023-07-14 14:00:25 +08:00
openeuler-ci-bot
2bb0518222
!35 [sync] PR-32: 【openEuler-22.03-LTS-SP1】Add version for the symbol cracklib-dicts
From: @openeuler-sync-bot 
Reviewed-by: @houmingyong 
Signed-off-by: @houmingyong
2023-04-26 09:13:58 +00:00
yixiangzhike
94b2096856 Add version for the symbol cracklib-dicts
(cherry picked from commit db65ffcd751a291af3b581e3f9a4ff3ba6143191)
2023-04-26 16:55:38 +08:00
openeuler-ci-bot
53b44842e5
!31 【Mainline】update to 2.9.8
From: @yixiangzhike 
Reviewed-by: @houmingyong 
Signed-off-by: @houmingyong
2022-10-24 02:40:11 +00:00
yixiangzhike
661cb8849f update to 2.9.8
Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
2022-10-21 15:04:02 +08:00
openeuler-ci-bot
33b263d583
!26 【Mainline】Fix issue of error length and truncate dict file
From: @yixiangzhike 
Reviewed-by: @houmingyong 
Signed-off-by: @houmingyong
2022-08-15 03:01:59 +00:00
yixiangzhike
a3e940f65b Fix issue of error length and truncate dict file
Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
2022-08-13 13:29:36 +08:00
openeuler-ci-bot
e0059e6f68 !14 【Mainline】Fix lookup for word in FindPW
From: @yixiangzhike
Reviewed-by: @zhujianwei001
Signed-off-by: @zhujianwei001
2021-12-06 11:49:47 +00:00
yixiangzhike
41a929be18 Fix lookup for word in FindPW() 2021-12-06 18:49:05 +08:00
6 changed files with 64 additions and 22 deletions

BIN
cracklib-2.9.11.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,30 +1,28 @@
%bcond_without python3
%define dictdir %{_datadir}/cracklib
%define dictpath %{dictdir}/pw_dict
Name: cracklib
Version: 2.9.7
Release: 6
Version: 2.9.11
Release: 1
Summary: A password-checking library
License: LGPLv2+
URL: http://sourceforge.net/projects/cracklib/
Source0: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-%{version}.tar.gz
Source1: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-words-%{version}.gz
Patch9000: fix-problem-of-error-message-about-simplistic-passwo.patch
Patch0: fix-problem-of-error-message-about-simplistic-passwo.patch
Patch1: fix-error-length-about-simplistic-password.patch
BuildRequires: gcc, words, gettext, gettext-autopoint, zlib-devel
%if %{with python3}
BuildRequires: python3-devel
%endif
Conflicts: cracklib-dicts < 2.8
Requires: gzip
Provides: cracklib-dicts
Provides: cracklib-dicts = %{version}-%{release}
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: cracklib-dicts
Obsoletes: cracklib-dicts < %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
%description
@ -46,7 +44,6 @@ for compiling applications which use cracklib.
%package_help
%if %{with python3}
%package -n python3-cracklib
Summary: Python 3 bindings for applications which use cracklib
Requires: %{name} = %{version}-%{release}
@ -54,7 +51,6 @@ Requires: %{name} = %{version}-%{release}
%description -n python3-cracklib
The python3-cracklib package contains a module which permits applications
written in the Python 3 programming language to use cracklib.
%endif
%prep
%autosetup -n %{name}-%{version} -p1
@ -67,7 +63,6 @@ done
chmod +x util/cracklib-format
%build
%if %{with python3}
sed -i 's,util/cracklib-check <,util/cracklib-check $(DESTDIR)/$(DEFAULT_CRACKLIB_DICT) <,' Makefile.in
py3include=`python3-config --includes | awk -F' ' '{print $1;}'`
export PYTHON=%{__python3}
@ -82,13 +77,10 @@ py_version="%{python3_version}$abiflags"
--with-default-dict=%{dictpath}
make -C po update-gmo
make
%endif
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%if %{with python3}
make install DESTDIR=$RPM_BUILD_ROOT 'pythondir=${pyexecdir}'
%endif
./util/cracklib-format cracklib-dicts/* | \
./util/cracklib-packer $RPM_BUILD_ROOT/%{dictpath}
@ -141,15 +133,31 @@ make test
%files help
%doc README README-WORDS NEWS
%{_mandir}/man3/*
%{_mandir}/man8/*
%if %{with python3}
%files -n python3-cracklib
%{_libdir}/python3*/site-packages/_cracklib*.so
%{_libdir}/python3*/site-packages/*.py*
%{_libdir}/python3*/site-packages/__pycache__/*
%endif
%changelog
* Fri Jul 14 2023 yixiangzhike <yixiangzhike007@163.com> - 2.9.11-1
- update to 2.9.11
* Wed Apr 26 2023 yixiangzhike <yixiangzhike007@163.com> - 2.9.8-2
- add version for the symbol cracklib-dicts
* Fri Oct 21 2022 yixiangzhike <yixiangzhike007@163.com> - 2.9.8-1
- update to 2.9.8
* Sat Aug 13 2022 yixiangzhike <yixiangzhike007@163.com> - 2.9.7-8
- fix issue of truncating dict file without input data
- fix error length about simplistic password
* Mon Dec 6 2021 yixiangzhike <yixiangzhike007@163.com> - 2.9.7-7
- fix lookup for word in FindPW()
* Mon May 24 2021 yixiangzhike <zhangxingliang3@huawei.com> - 2.9.7-6
- add %%config(noreplace) for pw_dict

View File

@ -0,0 +1,25 @@
From 7d4b42752a11b12088baad881a6e2cac3da638e7 Mon Sep 17 00:00:00 2001
From: yixiangzhike <yixiangzhike007@163.com>
Date: Sat, 13 Aug 2022 13:04:17 +0800
Subject: [PATCH] fix error length about simplistic password
---
util/cracklib-format | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/cracklib-format b/util/cracklib-format
index 360d109..2c1f61f 100755
--- a/util/cracklib-format
+++ b/util/cracklib-format
@@ -6,7 +6,7 @@
LC_ALL=C
export LC_ALL
gzip -cdf "$@" |
- grep -a -E -v '^.{30,}$' |
+ grep -a -E -v '^.{32,}$' |
tr '[:upper:]' '[:lower:]' |
sed s/[[:space:]]//g |
sort -u
--
2.33.0

View File

@ -6,8 +6,8 @@ Subject: [PATCH] fix problem of error message about simplistic password
Signed-off-by: openEuler Buildteam <buildteam@openeuler.org>
---
lib/fascist.c | 33 ++++++++++++++++++++++++++++-----
util/cracklib-format | 10 ++++++----
2 files changed, 34 insertions(+), 9 deletions(-)
util/cracklib-format | 19 ++++++----
2 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/lib/fascist.c b/lib/fascist.c
index c5a018c..a1a8564 100644
@ -103,19 +103,28 @@ index c5a018c..a1a8564 100644
printf("%-16s (reversed dict)\n", a);
#endif
diff --git a/util/cracklib-format b/util/cracklib-format
index 1d7be5b..360d109 100755
index c133d75..360d109 100755
--- a/util/cracklib-format
+++ b/util/cracklib-format
@@ -3,8 +3,10 @@
@@ -3,17 +3,10 @@
# This preprocesses a set of word lists into a suitable form for input
# into cracklib-packer
#
-# Truncates lines longer than 1022 characters long as cracklib-packer
-# does not handle them correctly.
-#
-# The last part of the pipeline uses 'grep -v' to remove any blank
-# lines (possibly introduced by earlier parts of the pipeline) as
-# cracklib-packer will generate "skipping line" warnings otherwise.
-#
+LC_ALL=C
+export LC_ALL
gzip -cdf "$@" |
- grep -v '^\(#\|$\)' |
- grep -a -v '^#' |
- tr '[A-Z]' '[a-z]' |
- tr -cd '\012[a-z][0-9]' |
- cut -c 1-1022 |
- grep -v '^$' |
- env LC_ALL=C sort -u
+ grep -a -E -v '^.{30,}$' |
+ tr '[:upper:]' '[:lower:]' |