Compare commits

...
Sign in to create a new pull request.

101 commits

Author SHA1 Message Date
Fedora Release Engineering
268edecb67 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 18:47:34 +00:00
Fedora Release Engineering
ac34a7a48c Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 14:47:34 +00:00
Fedora Release Engineering
48f6fe27af Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 20:09:33 +00:00
Fedora Release Engineering
253ee10c45 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 08:21:30 +00:00
Fedora Release Engineering
4beb16080f Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 16:19:48 +00:00
Dmitry Belyavskiy
4c9957c90f migrated to SPDX license 2023-08-04 14:29:48 +02:00
Fedora Release Engineering
78da225975 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 16:32:59 +00:00
Paul Wouters
d2f5af3f9e
update to 2.9.11
- Resolves: rhbz#2123955 cracklib-2.9.11 is available
- Remove old patches, port remaining patches to 2.9.11
- Use man pages from doc/ instead of pulling them from debian
2023-07-07 21:38:07 -04:00
Fedora Release Engineering
1a51e53e47 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 00:38:18 +00:00
Paul Wouters
3217e5685b
move Url: and License: to a saner spot higher up in spec file 2022-08-30 19:42:25 -04:00
Parag Nemade
57c3c940ca
As -dicts subpackage installs files under %{_libdir} path it should not be noarch
this fixes FTBFS on F37+
2022-08-30 18:39:06 +05:30
Fedora Release Engineering
8e08eacebe Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 23:43:03 +00:00
Paul Wouters
7903ce885c
another stashes patch hunk that was removed in a stashed version 2022-03-07 21:48:25 -05:00
Paul Wouters
d3fefae733
update sources 2022-03-07 21:42:42 -05:00
Paul Wouters
6d9868a4c6
also apply stashed changes :P 2022-03-07 21:37:40 -05:00
Paul Wouters
620dc687b7
update to 2.9.7
Mostly a security fix release for CVE 2016-6318 which
was already fixed in Fedora.
2022-03-07 21:19:20 -05:00
Fedora Release Engineering
bd42e8f9cf - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 23:57:59 +00:00
Paul Wouters
5d99be852e
- Resolves: rhbz#1994196 Remove /usr/bin/packer symbolic link 2021-08-30 23:50:23 +03:00
Fedora Release Engineering
fab3ab8641 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 20:05:13 +00:00
Fedora Release Engineering
0cc486dfc5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 02:40:38 +00:00
Tom Stellard
3e85d8d26d Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-17 03:59:46 +00:00
Fedora Release Engineering
28dcf39ec1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 14:42:06 +00:00
Tom Stellard
32ce35d61a Use make macros
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
2020-07-13 18:54:59 +00:00
Fedora Release Engineering
8dcbcb28e3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 14:58:29 +00:00
Tomas Mraz
a11e8f0582 Drop Python 2 bindings completely 2019-08-09 16:46:56 +02:00
Fedora Release Engineering
2e9952380c - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-24 21:09:23 +00:00
Fedora Release Engineering
c7cf122685 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 16:23:54 +00:00
Igor Gnatenko
1595629cca Remove obsolete BuildRoot tag
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-01-29 05:34:36 +01:00
Igor Gnatenko
f67e241300 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:23:58 +01:00
Tomas Mraz
bc61ed0119 Fix regression in dictionary creation and lookup 2018-11-26 16:44:58 +01:00
Tomas Mraz
6d35644e4b Fix minor bug found in the Coverity scan 2018-10-10 14:36:31 +02:00
Tomas Mraz
e828818539 Updated translations 2018-10-09 12:18:30 +02:00
Tomas Mraz
673d98d62e Properly call python2 in check. 2018-07-13 14:24:02 +02:00
Tomas Mraz
8274cbbc56 The test must use the dictionary from the build 2018-07-13 13:59:23 +02:00
Fedora Release Engineering
4b67c0c867 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-12 22:19:52 +00:00
Jason Tibbitts
4dbc86aaca Remove needless use of %defattr 2018-07-10 00:33:52 -05:00
Tomas Mraz
811f0d1829 Drop debugging leftover 2018-02-21 13:16:24 +01:00
Tomas Mraz
68dc49109f Drop Python 2 support in RHEL 2018-02-21 13:14:59 +01:00
Fedora Release Engineering
09348f50cb - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 05:52:59 +00:00
Igor Gnatenko
f69740c948
Switch to %ldconfig_scriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-03 18:17:40 +01:00
Iryna Shcherbina
73c5a99220 Update Python 2 dependency declarations to new packaging standards 2018-01-03 11:16:12 +01:00
Andrei Stepanov
96682a090d Add CI tests using the standard test interface
Adds tests according to the CI wiki [0] specifically the standard test interface in the spec [1].

[0]: https://fedoraproject.org/wiki/CI
[1]: https://fedoraproject.org/wiki/Changes/InvokingTests
2017-10-17 15:01:06 +00:00
Zbigniew Jędrzejewski-Szmek
bd8f1f5510 Add Provides for the old name without %_isa 2017-08-20 09:23:26 -04:00
Zbigniew Jędrzejewski-Szmek
31ac5ac711 Python 2 binary package renamed to python2-cracklib 2017-08-19 09:38:10 -04:00
Fedora Release Engineering
0b46647a95 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 19:15:12 +00:00
Fedora Release Engineering
f1a74a691b - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 05:36:59 +00:00
Fedora Release Engineering
2edb3e61e3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 07:57:53 +00:00
Tomas Mraz
345a730d45 fix CVE-2016-6318 - avoid overflows in GECOS handling and mangling password (#1364944) 2016-12-08 18:09:03 +01:00
Fedora Release Engineering
aff542331c - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages 2016-07-19 06:50:28 +00:00
Dennis Gilmore
aba629b842 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-03 18:12:09 +00:00
Tomas Mraz
d3e5311e69 new upstream release
- cleanup of the word lists
2015-10-23 17:07:18 +02:00
Dennis Gilmore
543a41b0c7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-17 03:21:52 +00:00
Peter Robinson
8757bbd8fe - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-16 01:32:04 +00:00
Tom Callaway
dd1a331c80 fix license handling 2014-07-11 16:52:23 -04:00
Dennis Gilmore
ecebfdc3b3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 01:07:35 -05:00
Tomas Mraz
02878afc6e The explicit make install for python not needed anymore. 2014-02-05 16:50:57 +01:00
Tomas Mraz
cb1f0ab799 move python files to libdir 2014-02-05 16:34:12 +01:00
Tomas Mraz
ec8362e10e new upstream release 2013-12-09 11:38:54 +01:00
Tomas Mraz
413dd98aaf update only .gmo files to avoid multilib conflicts (#1036305) 2013-12-02 09:43:13 +01:00
Tomas Mraz
edb1a12c91 updated translations 2013-11-28 14:35:33 +01:00
Tomas Mraz
3c36ea8ab5 do not remove any printable characters in cracklib-format
fix the broken zh_CN translation
2013-10-31 17:03:44 +01:00
Tomas Mraz
d8d736852f make the simplistic check and the purging of special characters much
less aggressive (#1003624, #985378)
2013-09-03 08:00:17 +02:00
Tomas Mraz
247f79b137 revert compression of the dictionaries as the performance penalty is too big 2013-08-28 11:38:35 +02:00
Tomas Mraz
a483b3bf78 fix the python module to work with compressed dictionaries (#972542)
- fix various dictionary lookup errors (#986400, #986401)
- make the library reentrant and fix compilation warnings
2013-08-21 15:36:05 +02:00
Dennis Gilmore
93277b06b1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-03 01:04:10 -05:00
Nalin Dahyabhai
af780d829b update to 2.9.0 (#970065)
- update to 2.9.0 (#970065)
  - adds FascistCheckUser()
- go ahead and compress the main dictionary, since we're linking with zlib
  anyway
2013-06-03 17:33:05 -04:00
Nalin Dahyabhai
8f75c6f5cf add man page pointers for cracklib-packer/unpacker
- point cracklib-packer and cracklib-unpacker man pages to cracklib-format
  (internal tooling)
2013-01-29 11:17:10 -05:00
Nalin Dahyabhai
c3650d7fc5 add missing buildrequires: on zlib-devel (#888876) 2012-12-19 12:34:18 -05:00
Nalin Dahyabhai
0f1834b35c update to 2.8.22
- update to 2.8.22 (#887461), which now returns an error instead of exiting
  when there's a failure opening the dictionary in FascistCheck()
2012-12-17 10:37:46 -05:00
Nalin Dahyabhai
54a8b87df0 update to 2.8.21 2012-12-13 12:57:02 -05:00
Nalin Dahyabhai
c10697f9d1 whoops, log the bug number for that 2012-12-10 12:59:43 -05:00
Nalin Dahyabhai
17bfc7742f update to 2.8.20
update to 2.8.20:
- python module renamed from _cracklibmodule.so to _cracklib.so
2012-12-10 12:55:56 -05:00
Nalin Dahyabhai
e8a82a9297 freshen the debian source archive
- update the copy of the debian source package to one that can still be
  retrieved using the URL we list for it
2012-11-20 13:21:09 -05:00
Dennis Gilmore
04fe0dfd7e - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-18 14:49:50 -05:00
Nalin Dahyabhai
3e92cf695c - update to 2.8.19 2012-05-18 15:15:10 -04:00
Nalin Dahyabhai
4b491a159a update to 2.8.19 2012-05-18 15:12:33 -04:00
Dennis Gilmore
374711c72a - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-12 17:59:31 -06:00
Dennis Gilmore
ebb6c40aa0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-08 05:48:21 -06:00
Nalin Dahyabhai
c3bac2cc19 - need to import this translation for now 2011-01-27 11:38:27 -05:00
Nalin Dahyabhai
1ba0c062d3 - update to 2.8.18
- add man pages from Debian (#583932)
- replace zh_CN translation (related to #627449)
2011-01-27 11:32:23 -05:00
Fedora Release Engineering
11bdd7bde4 dist-git conversion 2010-07-28 12:17:29 +00:00
dmalcolm
41aa895af1 - Rebuilt for
https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
2010-07-22 00:59:22 +00:00
Dan Horák
3c20d618c4 - added gettext-autopoint as BR: 2010-07-03 12:41:26 +00:00
Nalin Dahyabhai
6530d55766 - pull in changes to the Hindi translation (#589188) 2010-05-20 18:09:22 +00:00
Nalin Dahyabhai
5f1d933b2c - update to 2.8.16 2010-04-20 15:16:49 +00:00
Nalin Dahyabhai
f43257b89a - add passwords derived from rockyou breach data to the dictionaries
(Matthew Miller, #557592)
2010-01-22 14:49:23 +00:00
Nalin Dahyabhai
35b9346058 - update license: tag
- include license file
2010-01-21 16:04:12 +00:00
Nalin Dahyabhai
3ed30517cc - update to 2.8.15
- update cracklib-words to the current version (2008-05-07)
- fixup URLs for various dictionary sources that we use
- fix freeing-an-uninitialized-pointer in the python module (SF#2907102)
- add a disttag
2009-12-01 21:00:28 +00:00
Nalin Dahyabhai
61e8450d7a Don't depend on a consumer of <packer.h> to be using autoconf, and to be
checking for for the presence of <inttypes.h> and <stdint.h>, and
    including its own "config.h" before including <packer.h>, in order for
    this to be correct on 64-bit machines.
2009-12-01 20:54:54 +00:00
Nalin Dahyabhai
58eccb4e44 - don't free an uninitialized pointer 2009-12-01 20:53:07 +00:00
Nalin Dahyabhai
d19d1b26bb - report the filename we passed to lstat() when we treat its error return
as an exception
2009-12-01 20:52:43 +00:00
Bill Nottingham
2d55447325 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:47:37 +00:00
Jesse Keating
ddf45643f9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-24 19:36:50 +00:00
Nalin Dahyabhai
35ced7f189 - add explicit dependency on gzip for the sake of cracklib-format (Daniel
Mach, #501278)
2009-05-18 16:44:28 +00:00
Jesse Keating
78a1dbd7d4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-24 09:36:52 +00:00
Nalin Dahyabhai
d5515de521 - drop trailing "." from the package description for the dicts subpackage
(#225659)
2009-02-19 18:32:09 +00:00
Ignacio Vazquez-Abrams
1faf15733c Rebuild for Python 2.6 2008-11-29 16:36:46 +00:00
Nalin Dahyabhai
044e85f19f - more missing builddeps (gettext requires cvs)
- adjust spot-test for the python bindings to cope with new behavior
2008-10-28 21:43:01 +00:00
Nalin Dahyabhai
a95d0a0f24 add missing builddeps 2008-10-28 18:07:05 +00:00
Nalin Dahyabhai
fbf890aaa1 update to 2.8.13, which mainly overhauls the python bindings 2008-10-28 18:00:40 +00:00
Nalin Dahyabhai
edf74ee84e - fix errors rebuilding with libtool that's newer than the one upstream has
(#467364)
2008-10-28 17:35:23 +00:00
18 changed files with 1577 additions and 312 deletions

View file

@ -37,3 +37,26 @@ cracklib-2.8.9.tar.gz
pass_file.gz
cracklib-2.8.10.tar.gz
cracklib-2.8.12.tar.gz
cracklib-2.8.13.tar.gz
cracklib-2.8.15.tar.gz
cracklib-words-20080507.gz
cracklib-2.8.16.tar.gz
/cracklib2_2.8.18-1.debian.tar.gz
/cracklib-2.8.18.tar.gz
/cracklib-2.8.19.tar.gz
/cracklib2_2.8.19-1.debian.tar.gz
/cracklib2_2.8.19-1.dsc
/cracklib-2.8.20.tar.gz
/cracklib-2.8.21.tar.gz
/cracklib-2.8.22.tar.gz
/cracklib-2.9.0.tar.gz
/cracklib-2.9.1.tar.gz
/cracklib-2.9.6.tar.gz
/cracklib-words-2.9.6.gz
/missing-words.gz
/cracklib-2.9.7.tar.gz
/cracklib-words-2.9.7.gz
/cracklib2_2.9.2-1.debian.tar.xz
/cracklib2_2.9.2-1.dsc
/cracklib-2.9.11.tar.gz
/cracklib-words-2.9.11.gz

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: cracklib
# $Id$
NAME := cracklib
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View file

@ -1,39 +0,0 @@
Some docstrings for the Python module. Need to figure out how to fix the
summary in the help() output.
python -c 'import cracklib; help(cracklib)'
diff -up cracklib-2.8.10/python/cracklibmodule.c cracklib-2.8.10/python/cracklibmodule.c
--- cracklib-2.8.10/python/cracklibmodule.c 2007-07-19 09:57:04.000000000 -0400
+++ cracklib-2.8.10/python/cracklibmodule.c 2007-07-19 09:57:48.000000000 -0400
@@ -24,7 +24,6 @@ static pthread_mutex_t cracklib_mutex =
static PyObject *
cracklib_FascistCheck(PyObject *self, PyObject *args, PyObject *kwargs)
{
- int i;
char *candidate, *dict;
const char *result;
struct stat st;
@@ -96,12 +95,21 @@ cracklib_FascistCheck(PyObject *self, Py
static PyMethodDef
cracklibmethods[] =
{
- {"FascistCheck", cracklib_FascistCheck, METH_VARARGS | METH_KEYWORDS},
+ {"FascistCheck", cracklib_FascistCheck, METH_VARARGS | METH_KEYWORDS,
+ "Keyword arguments:\n"
+ " pw - candidate password\n"
+ " dict - dictionary location (default \""
+ DEFAULT_CRACKLIB_DICT
+ "\")\n"
+ "\n"
+ "Returns:\n"
+ " None on success, an error string on failure.\n"},
{NULL, NULL},
};
void
initcracklib(void)
{
- Py_InitModule("cracklib", cracklibmethods);
+ Py_InitModule3("cracklib", cracklibmethods,
+ "Python interface to libcrack's FascistCheck() function.\n");
}

View file

@ -1,32 +0,0 @@
Tiny problems in errors reported: when we're out of memory, report out of
memory unrelated to the filename. When we notice that the dictionary isn't
there, give the name of the file which wasn't there.
python -c 'import cracklib;cracklib.FascistCheck("canihas","/tmp/notthere")'
diff -up cracklib-2.8.10/python/cracklibmodule.c cracklib-2.8.10/python/cracklibmodule.c
--- cracklib-2.8.10/python/cracklibmodule.c 2007-01-26 11:55:07.000000000 -0500
+++ cracklib-2.8.10/python/cracklibmodule.c 2007-07-19 09:55:22.000000000 -0400
@@ -58,13 +58,13 @@ cracklib_FascistCheck(PyObject *self, Py
dictfile = malloc(strlen(dict) + sizeof(DICT_SUFFIX));
if (dictfile == NULL)
{
- PyErr_SetFromErrnoWithFilename(PyExc_OSError, dict);
+ PyErr_SetFromErrno(PyExc_MemoryError);
return NULL;
}
sprintf(dictfile, "%s" DICT_SUFFIX, dict);
if (lstat(dictfile, &st) == -1)
{
- PyErr_SetFromErrnoWithFilename(PyExc_OSError, dict);
+ PyErr_SetFromErrnoWithFilename(PyExc_OSError, dictfile);
free(dictfile);
return NULL;
}
@@ -74,7 +74,7 @@ cracklib_FascistCheck(PyObject *self, Py
if (lstat(DEFAULT_CRACKLIB_DICT DICT_SUFFIX, &st) == -1)
{
PyErr_SetFromErrnoWithFilename(PyExc_OSError,
- DEFAULT_CRACKLIB_DICT);
+ DEFAULT_CRACKLIB_DICT DICT_SUFFIX);
return NULL;
}
}

View file

@ -1,65 +0,0 @@
--- cracklib-2.8.9/configure.in 2006-02-17 14:49:12.000000000 -0500
+++ cracklib-2.8.9/configure.in 2007-03-12 18:47:32.000000000 -0400
@@ -23,6 +23,19 @@
AC_CHECK_HEADERS(stdint.h)
AC_CHECK_HEADERS(pthread.h)
+if test x$ac_cv_header_inttypes_h = xyes ; then
+ CRACKLIB_INTEGER_TYPES1="#include <inttypes.h>"
+ CRACKLIB_INTEGER_TYPES2=
+elif test x$ac_cv_header_stdint_h = xyes ; then
+ CRACKLIB_INTEGER_TYPES1="#include <stdint.h>"
+ CRACKLIB_INTEGER_TYPES2=
+else
+ CRACKLIB_INTEGER_TYPES1="typedef unsigned int uint32_t;"
+ CRACKLIB_INTEGER_TYPES2="typedef unsigned short uint16_t;"
+fi
+AC_SUBST(CRACKLIB_INTEGER_TYPES1)
+AC_SUBST(CRACKLIB_INTEGER_TYPES2)
+
dnl Cygwin workaround
AC_MSG_CHECKING(if LINE_MAX is defined)
AC_EGREP_CPP(yes,
@@ -87,6 +100,8 @@
dnl Handle local dict compiling properly
AC_SUBST(CROSS_COMPILING, $cross_compiling)
-AC_OUTPUT(util/Makefile lib/Makefile doc/Makefile python/Makefile Makefile \
- po/Makefile.in m4/Makefile dicts/Makefile cracklib.spec)
+AC_CONFIG_FILES(util/Makefile lib/Makefile doc/Makefile python/Makefile \
+ Makefile po/Makefile.in m4/Makefile dicts/Makefile \
+ cracklib.spec lib/packer.h)
+AC_OUTPUT
--- cracklib-2.8.9/lib/packer.h.in 2007-03-12 18:47:32.000000000 -0400
+++ cracklib-2.8.9/lib/packer.h.in 2007-03-12 18:49:50.000000000 -0400
@@ -32,17 +32,8 @@
#define _(String) (String)
#endif
-#if defined(HAVE_INTTYPES_H)
-#include <inttypes.h>
-#else
-#if defined(HAVE_STDINT_H)
-#include <stdint.h>
-#else
-typedef unsigned int uint32_t;
-typedef unsigned short uint16_t;
-#endif
-#endif
-
+@CRACKLIB_INTEGER_TYPES1@
+@CRACKLIB_INTEGER_TYPES2@
struct pi_header
{
@@ -84,6 +75,9 @@
int dummy;
} PWDICT;
+@CRACKLIB_INTEGER_TYPES1@
+@CRACKLIB_INTEGER_TYPES2@
+
#endif
extern PWDICT *PWOpen(const char *prefix, char *mode);

View file

@ -0,0 +1,662 @@
diff -Naur cracklib-2.9.11-orig/lib/fascist.c cracklib-2.9.11/lib/fascist.c
--- cracklib-2.9.11-orig/lib/fascist.c 2019-02-13 20:54:41.000000000 -0500
+++ cracklib-2.9.11/lib/fascist.c 2023-07-07 18:20:42.239904964 -0400
@@ -36,8 +36,8 @@
#undef DEBUG
#undef DEBUG2
-extern char *Reverse(char *buf);
-extern char *Lowercase(char *buf);
+extern char *Reverse(char *buf, char *area);
+extern char *Lowercase(char *buf, char *area);
static char *r_destructors[] = {
":", /* noop - must do this to test raw word. */
@@ -439,6 +439,8 @@
int i;
int len;
char *mp;
+ char area[STRINGSIZE];
+ char revarea[STRINGSIZE];
/* use destructors to turn password into rawtext */
/* note use of Reverse() to save duplicating all rules */
@@ -447,7 +449,7 @@
for (i = 0; r_destructors[i]; i++)
{
- if (!(mp = Mangle(password, r_destructors[i])))
+ if (!(mp = Mangle(password, r_destructors[i], area)))
{
continue;
}
@@ -462,10 +464,10 @@
}
#ifdef DEBUG
- printf("%-16s = %-16s (destruct %s reversed)\n", Reverse(mp), rawtext, r_destructors[i]);
+ printf("%-16s = %-16s (destruct %s reversed)\n", Reverse(mp, revarea), rawtext, r_destructors[i]);
#endif
- if (!strncmp(Reverse(mp), rawtext, len))
+ if (!strncmp(Reverse(mp, revarea), rawtext, len))
{
return (1);
}
@@ -473,7 +475,7 @@
for (i = 0; r_constructors[i]; i++)
{
- if (!(mp = Mangle(rawtext, r_constructors[i])))
+ if (!(mp = Mangle(rawtext, r_constructors[i], area)))
{
continue;
}
@@ -520,7 +522,7 @@
strncpy(tbuffer, gecos, STRINGSIZE);
tbuffer[STRINGSIZE-1] = '\0';
- strcpy(gbuffer, Lowercase(tbuffer));
+ Lowercase(tbuffer, gbuffer);
wc = 0;
ptr = gbuffer;
@@ -704,6 +706,7 @@
char junk[STRINGSIZE];
char *password;
char rpassword[STRINGSIZE];
+ char area[STRINGSIZE];
uint32_t notfound;
notfound = PW_WORDS(pwp);
@@ -740,7 +743,7 @@
return _("it does not contain enough DIFFERENT characters");
}
- strcpy(password, (char *)Lowercase(password));
+ strcpy(password, (char *)Lowercase(password, area));
Trim(password);
@@ -796,7 +799,7 @@
{
char *a;
- if (!(a = Mangle(password, r_destructors[i])))
+ if (!(a = Mangle(password, r_destructors[i], area)))
{
continue;
}
@@ -811,13 +814,13 @@
}
}
- strcpy(password, (char *)Reverse(password));
+ strcpy(password, (char *)Reverse(password, area));
for (i = 0; r_destructors[i]; i++)
{
char *a;
- if (!(a = Mangle(password, r_destructors[i])))
+ if (!(a = Mangle(password, r_destructors[i], area)))
{
continue;
}
diff -Naur cracklib-2.9.11-orig/lib/packer.h cracklib-2.9.11/lib/packer.h
--- cracklib-2.9.11-orig/lib/packer.h 2023-03-04 11:00:49.000000000 -0500
+++ cracklib-2.9.11/lib/packer.h 2023-07-07 18:21:04.315119032 -0400
@@ -82,7 +82,7 @@
extern unsigned int FindPW(PWDICT *pwp, char *string);
extern int PutPW(PWDICT *pwp, char *string);
extern int PMatch(char *control, char *string);
-extern char *Mangle(char *input, char *control);
+extern char *Mangle(char *input, char *control, char *area);
extern char Chop(char *string);
extern char *Trim(char *string);
extern char *FascistLook(PWDICT *pwp, char *instring);
diff -Naur cracklib-2.9.11-orig/lib/packlib.c cracklib-2.9.11/lib/packlib.c
--- cracklib-2.9.11-orig/lib/packlib.c 2023-03-04 11:00:49.000000000 -0500
+++ cracklib-2.9.11/lib/packlib.c 2023-07-07 18:44:55.183214284 -0400
@@ -65,8 +65,8 @@
char *mode;
{
int use64 = 0;
- static PWDICT pdesc;
- static PWDICT64 pdesc64;
+ PWDICT *pdesc;
+ PWDICT64 pdesc64;
char iname[STRINGSIZE];
char dname[STRINGSIZE];
char wname[STRINGSIZE];
@@ -74,13 +74,11 @@
void *ifp;
void *wfp;
- if (pdesc.header.pih_magic == PIH_MAGIC)
- {
- fprintf(stderr, "%s: another dictionary already open\n", prefix);
+ pdesc = malloc(sizeof(*pdesc));
+ if (pdesc == NULL)
return NULL;
- }
- memset(&pdesc, '\0', sizeof(pdesc));
+ memset(pdesc, '\0', sizeof(*pdesc));
memset(&pdesc64, '\0', sizeof(pdesc64));
snprintf(iname, STRINGSIZE, "%s.pwi", prefix);
@@ -89,77 +87,80 @@
if (mode[0] == 'r')
{
- pdesc.flags &= ~PFOR_USEZLIB;
+ pdesc->flags &= ~PFOR_USEZLIB;
/* first try the normal db file */
- if (!(pdesc.dfp = fopen(dname, mode)))
+ if (!(pdesc->dfp = fopen(dname, mode)))
{
#ifdef HAVE_ZLIB_H
- pdesc.flags |= PFOR_USEZLIB;
+ pdesc->flags |= PFOR_USEZLIB;
/* try extension .gz */
snprintf(dname, STRINGSIZE, "%s.pwd.gz", prefix);
- if (!(pdesc.dfp = gzopen(dname, mode)))
+ if (!(pdesc->dfp = gzopen(dname, mode)))
{
perror(dname);
+ free(pdesc);
return NULL;
}
#else
perror(dname);
+ free(pdesc);
return NULL;
#endif
}
}
else
{
- pdesc.flags &= ~PFOR_USEZLIB;
+ pdesc->flags &= ~PFOR_USEZLIB;
/* write mode: use fopen */
- if (!(pdesc.dfp = fopen(dname, mode)))
+ if (!(pdesc->dfp = fopen(dname, mode)))
{
perror(dname);
+ free(pdesc);
return NULL;
}
}
- if (!(pdesc.ifp = fopen(iname, mode)))
+ if (!(pdesc->ifp = fopen(iname, mode)))
{
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
- gzclose(pdesc.dfp);
+ if (pdesc->flags & PFOR_USEZLIB)
+ gzclose(pdesc->dfp);
else
#endif
- fclose(pdesc.dfp);
+ fclose(pdesc->dfp);
perror(iname);
+ free(pdesc);
return NULL;
}
- if ((pdesc.wfp = fopen(wname, mode)))
+ if ((pdesc->wfp = fopen(wname, mode)))
{
- pdesc.flags |= PFOR_USEHWMS;
+ pdesc->flags |= PFOR_USEHWMS;
}
- ifp = pdesc.ifp;
- dfp = pdesc.dfp;
- wfp = pdesc.wfp;
+ ifp = pdesc->ifp;
+ dfp = pdesc->dfp;
+ wfp = pdesc->wfp;
if (mode[0] == 'w')
{
- pdesc.flags |= PFOR_WRITE;
- pdesc.header.pih_magic = PIH_MAGIC;
- pdesc.header.pih_blocklen = NUMWORDS;
- pdesc.header.pih_numwords = 0;
+ pdesc->flags |= PFOR_WRITE;
+ pdesc->header.pih_magic = PIH_MAGIC;
+ pdesc->header.pih_blocklen = NUMWORDS;
+ pdesc->header.pih_numwords = 0;
- fwrite((char *) &pdesc.header, sizeof(pdesc.header), 1, ifp);
+ fwrite((char *) &pdesc->header, sizeof(pdesc->header), 1, ifp);
} else
{
- pdesc.flags &= ~PFOR_WRITE;
+ pdesc->flags &= ~PFOR_WRITE;
- if (!fread((char *) &pdesc.header, sizeof(pdesc.header), 1, ifp))
+ if (!fread((char *) &pdesc->header, sizeof(pdesc->header), 1, ifp))
{
fprintf(stderr, "%s: error reading header\n", prefix);
- pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -168,10 +169,11 @@
{
fclose(wfp);
}
+ free(pdesc);
return NULL;
}
- if ((pdesc.header.pih_magic == 0) || (pdesc.header.pih_numwords == 0))
+ if ((pdesc->header.pih_magic == 0) || (pdesc->header.pih_numwords == 0))
{
/* uh-oh. either a broken "64-bit" file or a garbage file. */
rewind (ifp);
@@ -179,10 +181,9 @@
{
fprintf(stderr, "%s: error reading header\n", prefix);
- pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -191,6 +192,7 @@
{
fclose(wfp);
}
+ free(pdesc);
return NULL;
}
if (pdesc64.header.pih_magic != PIH_MAGIC)
@@ -198,10 +200,9 @@
/* nope, not "64-bit" after all */
fprintf(stderr, "%s: error reading header\n", prefix);
- pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -211,23 +212,23 @@
{
fclose(wfp);
}
+ free(pdesc);
return NULL;
}
- pdesc.header.pih_magic = pdesc64.header.pih_magic;
- pdesc.header.pih_numwords = pdesc64.header.pih_numwords;
- pdesc.header.pih_blocklen = pdesc64.header.pih_blocklen;
- pdesc.header.pih_pad = pdesc64.header.pih_pad;
+ pdesc->header.pih_magic = pdesc64.header.pih_magic;
+ pdesc->header.pih_numwords = pdesc64.header.pih_numwords;
+ pdesc->header.pih_blocklen = pdesc64.header.pih_blocklen;
+ pdesc->header.pih_pad = pdesc64.header.pih_pad;
use64 = 1;
}
- if (pdesc.header.pih_magic != PIH_MAGIC)
+ if (pdesc->header.pih_magic != PIH_MAGIC)
{
fprintf(stderr, "%s: magic mismatch\n", prefix);
- pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -237,17 +238,17 @@
{
fclose(wfp);
}
+ free(pdesc);
return NULL;
}
- if (pdesc.header.pih_numwords < 1)
+ if (pdesc->header.pih_numwords < 1)
{
fprintf(stderr, "%s: invalid word count\n", prefix);
- pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -256,17 +257,17 @@
{
fclose(wfp);
}
+ free(pdesc);
return NULL;
}
- if (pdesc.header.pih_blocklen != NUMWORDS)
+ if (pdesc->header.pih_blocklen != NUMWORDS)
{
fprintf(stderr, "%s: size mismatch\n", prefix);
- pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if (pdesc.flags & PFOR_USEZLIB)
+ if (pdesc->flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
@@ -275,10 +276,11 @@
{
fclose(wfp);
}
+ free(pdesc);
return NULL;
}
- if (pdesc.flags & PFOR_USEHWMS)
+ if (pdesc->flags & PFOR_USEHWMS)
{
int i;
@@ -286,27 +288,27 @@
{
if (fread(pdesc64.hwms, 1, sizeof(pdesc64.hwms), wfp) != sizeof(pdesc64.hwms))
{
- pdesc.flags &= ~PFOR_USEHWMS;
+ pdesc->flags &= ~PFOR_USEHWMS;
}
- for (i = 0; i < sizeof(pdesc.hwms) / sizeof(pdesc.hwms[0]); i++)
+ for (i = 0; i < sizeof(pdesc->hwms) / sizeof(pdesc->hwms[0]); i++)
{
- pdesc.hwms[i] = pdesc64.hwms[i];
+ pdesc->hwms[i] = pdesc64.hwms[i];
}
}
- else if (fread(pdesc.hwms, 1, sizeof(pdesc.hwms), wfp) != sizeof(pdesc.hwms))
+ else if (fread(pdesc->hwms, 1, sizeof(pdesc->hwms), wfp) != sizeof(pdesc->hwms))
{
- pdesc.flags &= ~PFOR_USEHWMS;
+ pdesc->flags &= ~PFOR_USEHWMS;
}
#if DEBUG
for (i=1; i<=0xff; i++)
{
- printf("hwm[%02x] = %d\n", i, pdesc.hwms[i]);
+ printf("hwm[%02x] = %d\n", i, pdesc->hwms[i]);
}
#endif
}
}
- return (&pdesc);
+ return (pdesc);
}
int
@@ -327,12 +329,14 @@
if (fseek(pwp->ifp, 0L, 0))
{
fprintf(stderr, "index magic fseek failed\n");
+ free(pwp);
return (-1);
}
if (!fwrite((char *) &pwp->header, sizeof(pwp->header), 1, pwp->ifp))
{
fprintf(stderr, "index magic fwrite failed\n");
+ free(pwp);
return (-1);
}
@@ -366,6 +370,7 @@
}
pwp->header.pih_magic = 0;
+ free(pwp);
return (0);
}
diff -Naur cracklib-2.9.11-orig/lib/rules.c cracklib-2.9.11/lib/rules.c
--- cracklib-2.9.11-orig/lib/rules.c 2023-04-02 14:15:05.000000000 -0400
+++ cracklib-2.9.11/lib/rules.c 2023-07-07 18:58:04.892943574 -0400
@@ -80,12 +80,12 @@
}
char *
-Reverse(str) /* return a pointer to a reversal */
+Reverse(str, area) /* return a pointer to a reversal */
char *str;
+ char *area;
{
int i;
int j;
- static char area[STRINGSIZE];
j = i = strlen(str);
while (*str)
{
@@ -96,11 +96,11 @@
}
char *
-Uppercase(str) /* return a pointer to an uppercase */
+Uppercase(str, area) /* return a pointer to an uppercase */
char *str;
+ char *area;
{
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*str)
{
@@ -113,11 +113,11 @@
}
char *
-Lowercase(str) /* return a pointer to an lowercase */
+Lowercase(str, area) /* return a pointer to an lowercase */
char *str;
+ char *area;
{
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*str)
{
@@ -130,11 +130,11 @@
}
char *
-Capitalise(str) /* return a pointer to an capitalised */
+Capitalise(str, area) /* return a pointer to an capitalised */
char *str;
+ char *area;
{
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*str)
@@ -149,11 +149,11 @@
}
char *
-Pluralise(string) /* returns a pointer to a plural */
+Pluralise(string, area) /* returns a pointer to a plural */
char *string;
+ char *area;
{
int length;
- static char area[STRINGSIZE];
length = strlen(string);
strcpy(area, string);
@@ -190,13 +190,13 @@
}
char *
-Substitute(string, old, new) /* returns pointer to a swapped about copy */
+Substitute(string, old, new, area) /* returns pointer to a swapped about copy */
char *string;
char old;
char new;
+ char *area;
{
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*string)
{
@@ -208,12 +208,12 @@
}
char *
-Purge(string, target) /* returns pointer to a purged copy */
+Purge(string, target, area) /* returns pointer to a purged copy */
char *string;
char target;
+ char *area;
{
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*string)
{
@@ -370,13 +370,13 @@
}
char *
-PolySubst(string, class, new) /* returns pointer to a swapped about copy */
+PolySubst(string, class, new, area) /* returns pointer to a swapped about copy */
char *string;
char class;
char new;
+ char *area;
{
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*string)
{
@@ -388,12 +388,12 @@
}
char *
-PolyPurge(string, class) /* returns pointer to a purged copy */
+PolyPurge(string, class, area) /* returns pointer to a purged copy */
char *string;
char class;
+ char *area;
{
char *ptr;
- static char area[STRINGSIZE];
ptr = area;
while (*string)
{
@@ -426,39 +426,40 @@
}
char *
-Mangle(input, control) /* returns a pointer to a controlled Mangle */
+Mangle(input, control, area) /* returns a pointer to a controlled Mangle */
char *input;
char *control;
+ char *area;
{
int limit;
char *ptr;
- static char area[STRINGSIZE * 2] = {0};
char area2[STRINGSIZE * 2] = {0};
strcpy(area, input);
for (ptr = control; *ptr; ptr++)
{
+ strcpy(area2, area);
switch (*ptr)
{
case RULE_NOOP:
break;
case RULE_REVERSE:
- strcpy(area, Reverse(area));
+ Reverse(area2, area);
break;
case RULE_UPPERCASE:
- strcpy(area, Uppercase(area));
+ Uppercase(area2, area);
break;
case RULE_LOWERCASE:
- strcpy(area, Lowercase(area));
+ Lowercase(area2, area);
break;
case RULE_CAPITALISE:
- strcpy(area, Capitalise(area));
+ Capitalise(area2, area);
break;
case RULE_PLURALISE:
- strcpy(area, Pluralise(area));
+ Pluralise(area2, area);
break;
case RULE_REFLECT:
- strcat(area, Reverse(area));
+ strcat(area, Reverse(area, area2));
break;
case RULE_DUPLICATE:
strcpy(area2, area);
@@ -545,7 +546,6 @@
Debug(1, "Mangle: extract: weird argument in '%s'\n", control);
return NULL;
}
- strcpy(area2, area);
for (i = 0; length-- && area2[start + i]; i++)
{
area[i] = area2[start + i];
@@ -616,10 +616,10 @@
return NULL;
} else if (ptr[1] != RULE_CLASS)
{
- strcpy(area, Purge(area, *(++ptr)));
+ Purge(area2, *(++ptr), area);
} else
{
- strcpy(area, PolyPurge(area, ptr[2]));
+ PolyPurge(area2, ptr[2], area);
ptr += 2;
}
break;
@@ -630,11 +630,11 @@
return NULL;
} else if (ptr[1] != RULE_CLASS)
{
- strcpy(area, Substitute(area, ptr[1], ptr[2]));
+ Substitute(area2, ptr[1], ptr[2], area);
ptr += 2;
} else
{
- strcpy(area, PolySubst(area, ptr[2], ptr[3]));
+ PolySubst(area2, ptr[2], ptr[3], area);
ptr += 3;
}
break;

View file

@ -0,0 +1,111 @@
diff -Naur cracklib-2.9.11-orig/lib/fascist.c cracklib-2.9.11/lib/fascist.c
--- cracklib-2.9.11-orig/lib/fascist.c 2023-07-07 21:18:25.582821076 -0400
+++ cracklib-2.9.11/lib/fascist.c 2023-07-07 21:19:55.130234075 -0400
@@ -55,7 +55,6 @@
"/?p@?p", /* purging out punctuation/symbols/junk */
"/?s@?s",
- "/?X@?X",
/* attempt reverse engineering of password strings */
@@ -454,6 +453,12 @@
continue;
}
+ if (len - strlen(mp) >= 3)
+ {
+ /* purged too much */
+ continue;
+ }
+
#ifdef DEBUG
printf("%-16s = %-16s (destruct %s)\n", mp, rawtext, r_destructors[i]);
#endif
@@ -480,6 +485,12 @@
continue;
}
+ if (len - strlen(mp) >= 3)
+ {
+ /* purged too much */
+ continue;
+ }
+
#ifdef DEBUG
printf("%-16s = %-16s (construct %s)\n", mp, password, r_constructors[i]);
#endif
@@ -708,6 +719,7 @@
char rpassword[STRINGSIZE];
char area[STRINGSIZE];
uint32_t notfound;
+ int len;
notfound = PW_WORDS(pwp);
/* already truncated if from FascistCheck() */
@@ -757,6 +769,7 @@
return _("it is all whitespace");
}
+ len = strlen(password);
i = 0;
ptr = password;
while (ptr[0] && ptr[1])
@@ -768,10 +781,9 @@
ptr++;
}
- /* Change by Ben Karsin from ITS at University of Hawaii at Manoa. Static MAXSTEP
- would generate many false positives for long passwords. */
- maxrepeat = 3+(0.09*strlen(password));
- if (i > maxrepeat)
+ /* We were still generating false positives for long passwords.
+ Just count systematic double as a single character. */
+ if (len - i < MINLEN)
{
return _("it is too simplistic/systematic");
}
@@ -804,6 +816,12 @@
continue;
}
+ if (len - strlen(a) >= 3)
+ {
+ /* purged too much */
+ continue;
+ }
+
#ifdef DEBUG
printf("%-16s (dict)\n", a);
#endif
@@ -824,6 +842,13 @@
{
continue;
}
+
+ if (len - strlen(a) >= 3)
+ {
+ /* purged too much */
+ continue;
+ }
+
#ifdef DEBUG
printf("%-16s (reversed dict)\n", a);
#endif
diff -Naur cracklib-2.9.11-orig/util/cracklib-format cracklib-2.9.11/util/cracklib-format
--- cracklib-2.9.11-orig/util/cracklib-format 2021-01-22 10:58:14.000000000 -0500
+++ cracklib-2.9.11/util/cracklib-format 2023-07-07 21:19:14.854048317 -0400
@@ -10,10 +10,12 @@
# 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 -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
+ sort -u

78
cracklib.default.zh_CN.po Normal file
View file

@ -0,0 +1,78 @@
# translation of cracklib.default.po to Wei Liu
# Copyright (C) 2010 Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
#
# Leah Liu <lliu@redhat.com>, 2010.
msgid ""
msgstr ""
"Project-Id-Version: cracklib.default\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-03-02 21:00-0600\n"
"PO-Revision-Date: 2010-09-07 23:42+1000\n"
"Last-Translator: Leah Liu <lliu@redhat.com>\n"
"Language-Team: Wei Liu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#: lib/fascist.c:550
msgid "you are not registered in the password file"
msgstr "尚未在口令文件中注册"
#: lib/fascist.c:564
msgid "it is based on your username"
msgstr "它基于用户名"
#: lib/fascist.c:629
msgid "it is based upon your password entry"
msgstr "它基于输入的口令"
#: lib/fascist.c:649
msgid "it is derived from your password entry"
msgstr "它派生自输入的口令"
#: lib/fascist.c:662
msgid "it's derived from your password entry"
msgstr "它派生自输入的口令"
#: lib/fascist.c:676
msgid "it is derivable from your password entry"
msgstr "可从输入的口令推断"
#: lib/fascist.c:690
msgid "it's derivable from your password entry"
msgstr "可从输入的口令推断"
#: lib/fascist.c:726
msgid "it is WAY too short"
msgstr "WAY 过短"
#: lib/fascist.c:731
msgid "it is too short"
msgstr "过短"
#: lib/fascist.c:748
msgid "it does not contain enough DIFFERENT characters"
msgstr "它没有包含足够的不同字符"
#: lib/fascist.c:762
msgid "it is all whitespace"
msgstr "全是空格"
#: lib/fascist.c:781
msgid "it is too simplistic/systematic"
msgstr "过于简单化/系统化"
#: lib/fascist.c:786
msgid "it looks like a National Insurance number."
msgstr "看起来像国家保险号码。"
#: lib/fascist.c:813
msgid "it is based on a dictionary word"
msgstr "它基于字典单词"
#: lib/fascist.c:832
msgid "it is based on a (reversed) dictionary word"
msgstr "它基于(颠倒的)字典单词"

View file

@ -4,53 +4,28 @@
Summary: A password-checking library
Name: cracklib
Version: 2.8.12
Release: 2
Group: System Environment/Libraries
Source0: http://prdownloads.sourceforge.net/cracklib/cracklib-%{version}.tar.gz
Version: 2.9.11
Release: 8%{?dist}
URL: https://github.com/cracklib/cracklib
License: LGPL-2.1-or-later
# Retrieved at 20070213003424Z.
Source1: http://prdownloads.sourceforge.net/cracklib/cracklib-words.gz
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
# From attachment to https://bugzilla.redhat.com/show_bug.cgi?id=627449
Source2: cracklib.default.zh_CN.po
# No upstream source for this, just words missing from the current cracklib-words
Source3: missing-words.gz
Source10: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/Domains.gz
Source11: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/Dosref.gz
Source12: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/Ftpsites.gz
Source13: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/Jargon.gz
Source14: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/common-passwords.txt.gz
Source15: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/etc-hosts.gz
Source16: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/movieTV/Movies.gz
Source17: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/movieTV/Python.gz
Source18: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/movieTV/Trek.gz
Source19: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/LCarrol.gz
Source20: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/Paradise.Lost.gz
Source21: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/cartoon.gz
Source22: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/myths-legends.gz
Source23: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/sf.gz
Source24: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/shakespeare.gz
Source25: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/ASSurnames.gz
Source26: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/Congress.gz
Source27: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/Family-Names.gz
Source28: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/Given-Names.gz
Source29: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/famous.gz
Source30: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/fast-names.gz
Source31: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/female-names.gz
Source32: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/male-names.gz
Source33: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/names.french.gz
Source34: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/names.hp.gz
Source35: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/other-names.gz
Source36: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/surnames.finnish.gz
Patch: cracklib-2.9.11-packlib-reentrant.patch
Patch: cracklib-2.9.11-simplistic.patch
# No upstream source for this; it came in as a bugzilla attachment.
Source37: pass_file.gz
Patch0: cracklib-2.8.10-suffix.patch
Patch1: cracklib-2.8.12-inttypes.patch
Patch2: cracklib-2.8.10-docstring.patch
URL: http://sourceforge.net/projects/cracklib/
License: GPLv2
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: python-devel, words, automake, libtool
BuildRequires: gcc
BuildRequires: words, gettext
BuildRequires: gettext-autopoint
BuildRequires: zlib-devel
Conflicts: cracklib-dicts < 2.8
# The cracklib-format script calls gzip, but without a specific path.
Requires: gzip
%description
CrackLib tests passwords to determine whether they match certain
@ -72,26 +47,16 @@ CrackLib, you will also want to install the cracklib-dicts package.
%package devel
Summary: Development files needed for building applications which use cracklib
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The cracklib-devel package contains the header files and libraries needed
for compiling applications which use cracklib.
%package python
Summary: Python bindings for applications which use cracklib
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description python
The cracklib-python package contains a module which permits applications
written in the Python programming language to use cracklib.
%package dicts
Summary: The standard CrackLib dictionaries.
Group: System Environment/Libraries
Summary: The standard CrackLib dictionaries
BuildRequires: words >= 2-13
BuildRequires: make
Requires: cracklib = %{version}-%{release}
%description dicts
@ -103,116 +68,359 @@ contains the utilities necessary for the creation of new dictionaries.
If you are installing CrackLib, you should also install cracklib-dicts.
%prep
%setup -q
%patch0 -p1 -b .suffix
cp lib/packer.h lib/packer.h.in
%patch1 -p1 -b .inttypes
%patch2 -p1 -b .docstring
autoreconf
%autosetup -p 1
# Replace zn_CN.po with one that wasn't mis-transcoded at some point.
install -p -m 644 %{SOURCE2} po/zh_CN.po
mkdir cracklib-dicts
for dict in %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} \
%{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} \
%{SOURCE20} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} \
%{SOURCE25} %{SOURCE26} %{SOURCE27} %{SOURCE28} %{SOURCE29} \
%{SOURCE30} %{SOURCE31} %{SOURCE32} %{SOURCE33} %{SOURCE34} \
%{SOURCE35} %{SOURCE36} %{SOURCE37} %{SOURCE1}
for dict in %{SOURCE3} %{SOURCE1}
do
cp -fv ${dict} cracklib-dicts/
done
chmod +x util/cracklib-format
%build
%configure --with-pic --with-python --with-default-dict=%{dictpath} --disable-static
# Use the dictionary from the build to test
sed -i 's,util/cracklib-check <,util/cracklib-check $(DESTDIR)/$(DEFAULT_CRACKLIB_DICT) <,' Makefile.in
%configure --with-pic \
--without-python \
--with-default-dict=%{dictpath} --disable-static
make -C po update-gmo
make
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%make_install 'pythondir=${pyexecdir}'
./util/cracklib-format cracklib-dicts/* | \
./util/cracklib-packer $RPM_BUILD_ROOT/%{dictpath}
./util/cracklib-format $RPM_BUILD_ROOT/%{dictdir}/cracklib-small | \
./util/cracklib-packer $RPM_BUILD_ROOT/%{dictdir}/cracklib-small
rm -f $RPM_BUILD_ROOT/%{dictdir}/cracklib-small
sed s,/usr/lib/cracklib_dict,%{dictpath},g lib/crack.h > $RPM_BUILD_ROOT/%{_includedir}/crack.h
ln -s cracklib-format $RPM_BUILD_ROOT/%{_sbindir}/mkdict
ln -s cracklib-packer $RPM_BUILD_ROOT/%{_sbindir}/packer
touch $RPM_BUILD_ROOT/top
./util/cracklib-packer %{buildroot}%{dictpath}
./util/cracklib-format %{buildroot}%{dictdir}/cracklib-small | \
./util/cracklib-packer %{buildroot}%{dictdir}/cracklib-small
rm -f %{buildroot}%{dictdir}/cracklib-small
sed s,/usr/lib/cracklib_dict,%{dictpath},g lib/crack.h > %{buildroot}%{_includedir}/crack.h
ln -s cracklib-format %{buildroot}%{_sbindir}/mkdict
# packer link removed as it clashes with hashicorp's packer binary.
#ln -s cracklib-packer %{buildroot}/%{_sbindir}/packer
touch %{buildroot}/top
toprelpath=..
touch $RPM_BUILD_ROOT/top
while ! test -f $RPM_BUILD_ROOT/%{_libdir}/$toprelpath/top ; do
touch %{buildroot}/top
while ! test -f %{buildroot}%{_libdir}/$toprelpath/top ; do
toprelpath=../$toprelpath
done
rm -f $RPM_BUILD_ROOT/top
rm -f %{buildroot}/top
if test %{dictpath} != %{_libdir}/cracklib_dict ; then
ln -s $toprelpath%{dictpath}.hwm $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.hwm
ln -s $toprelpath%{dictpath}.pwd $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwd
ln -s $toprelpath%{dictpath}.pwi $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwi
ln -s $toprelpath%{dictpath}.hwm %{buildroot}%{_libdir}/cracklib_dict.hwm
ln -s $toprelpath%{dictpath}.pwd %{buildroot}%{_libdir}/cracklib_dict.pwd
ln -s $toprelpath%{dictpath}.pwi %{buildroot}%{_libdir}/cracklib_dict.pwi
fi
rm -f %{buildroot}%{_libdir}/python*/site-packages/_cracklib*.*a
rm -f %{buildroot}%{_libdir}/libcrack.la
mkdir -p %{buildroot}%{_mandir}/man{3,8}
install -p -m644 doc/*.3 %{buildroot}%{_mandir}/man3/
install -p -m644 doc/*.8 %{buildroot}%{_mandir}/man8/
if ! test -s %{buildroot}%{_mandir}/man8/cracklib-packer.8 ; then
echo .so man8/cracklib-format.8 > %{buildroot}%{_mandir}/man8/cracklib-packer.8
fi
if ! test -s %{buildroot}%{_mandir}/man8/cracklib-unpacker.8 ; then
echo .so man8/cracklib-format.8 > %{buildroot}%{_mandir}/man8/cracklib-unpacker.8
fi
rm -f $RPM_BUILD_ROOT/%{_libdir}/python*/site-packages/cracklibmodule.*a
rm -f $RPM_BUILD_ROOT/%{_libdir}/libcrack.la
%find_lang %{name}
%check
# We want to check that the new library is able to open the new dictionaries,
# using the new python module.
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir} %{__python} 2>&1 << EOF
import string, sys
# Prepend buildroot-specific variations of the python path to the python path.
syspath2=[]
for element in sys.path:
syspath2.append("$RPM_BUILD_ROOT/" + element)
syspath2.reverse()
for element in syspath2:
sys.path.insert(0,element)
# Now actually do the test. If we get a different result, or throw an
# exception, the script will end with the error.
import cracklib
s = cracklib.FascistCheck("cracklib", "$RPM_BUILD_ROOT/%{dictpath}")
expected = "it is based on a dictionary word"
if s != expected:
print "Got unexpected result \"%s\"," % s,
print "instead of expected value of \"%s\"." % expected
sys.exit(1)
EOF
make test DESTDIR=%{buildroot}
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%triggerpostun -p /sbin/ldconfig -- cracklib < 2.7-24
%ldconfig_scriptlets
%files -f %{name}.lang
%defattr(-,root,root)
%doc README README-WORDS NEWS README-LICENSE AUTHORS
%license COPYING.LIB
%{_libdir}/libcrack.so.*
%dir %{_datadir}/cracklib
%{_datadir}/cracklib/cracklib.magic
%{_sbindir}/*cracklib*
%{_mandir}/man8/*
%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/libcrack.so
%{_mandir}/man3/*
%files dicts
%defattr(-,root,root)
%dir %{_datadir}/cracklib
%{_datadir}/cracklib/pw_dict.*
%{_datadir}/cracklib/cracklib-small.*
%{_libdir}/cracklib_dict.*
%{_sbindir}/mkdict
%{_sbindir}/packer
%files python
%defattr(-,root,root)
%{_libdir}/python*/site-packages/cracklibmodule.so
%changelog
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.11-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.11-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.11-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.11-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.11-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Aug 04 2023 Dmitry Belyavskiy <dbelyavs@redhat.com> - 2.9.11-3
- migrated to SPDX license
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jul 07 2023 Paul Wouters <paul.wouters@aiven.io - 2.9.11-1
- Resolves: rhbz#2123955 cracklib-2.9.11 is available
- Remove old patches, port remaining patches to 2.9.11
- Use man pages from doc/ instead of pulling them from debian
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.7-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Aug 30 2022 Parag Nemade <pnemade AT redhat DOT com> - 2.9.7-30
- As -dicts subpackage installs files under %%{_libdir} path it should not be noarch
- this fixes FTBFS on F37+
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.7-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Aug 30 2021 Paul Wouters <paul.wouters@aiven.io> - 2.9.6-27
- Resolves: rhbz#1994196 Remove /usr/bin/packer symbolic link
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 2.9.6-23
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Aug 9 2019 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-21
- Drop Python 2 bindings completely
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Nov 26 2018 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-18
- Fix regression in dictionary creation and lookup
* Wed Oct 10 2018 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-17
- Fix minor bug found in the Coverity scan
* Tue Oct 9 2018 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-16
- Updated translations
* Fri Jul 13 2018 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-15
- The test must use the dictionary from the build
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 21 2018 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-13
- Drop Python 2 support in RHEL
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.9.6-11
- Switch to %%ldconfig_scriptlets
* Wed Jan 03 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.9.6-10
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.9.6-9
- Add Provides for the old name without %%_isa
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.9.6-8
- Python 2 binary package renamed to python2-cracklib
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Dec 8 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.6-4
- fix CVE-2016-6318 - avoid overflows in GECOS handling and mangling password (#1364944)
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.6-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Oct 23 2015 Tomáš Mráz <tmraz@redhat.com> - 2.9.6-1
- new upstream release
- cleanup of the word lists
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Fri Jul 11 2014 Tom Callaway <spot@fedoraproject.org> - 2.9.1-4
- fix license handling
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed Feb 5 2014 Tomáš Mráz <tmraz@redhat.com> - 2.9.1-2
- move python files to libdir
* Mon Dec 9 2013 Tomáš Mráz <tmraz@redhat.com> - 2.9.1-1
- new upstream release
* Mon Dec 2 2013 Tomáš Mráz <tmraz@redhat.com> - 2.9.0-9
- update only .gmo files to avoid multilib conflicts (#1036305)
* Thu Nov 28 2013 Tomáš Mráz <tmraz@redhat.com> - 2.9.0-8
- updated translations
* Thu Oct 31 2013 Tomáš Mráz <tmraz@redhat.com> - 2.9.0-7
- do not remove any printable characters in cracklib-format
* Thu Oct 31 2013 Tomáš Mráz <tmraz@redhat.com> - 2.9.0-6
- fix the broken zh_CN translation
* Tue Sep 3 2013 Tomáš Mráz <tmraz@redhat.com> - 2.9.0-5
- make the simplistic check and the purging of special characters much
less aggressive (#1003624, #985378)
* Wed Aug 28 2013 Tomáš Mráz <tmraz@redhat.com> - 2.9.0-4
- revert compression of the dictionaries as the performance penalty is too big
* Wed Aug 21 2013 Tomáš Mráz <tmraz@redhat.com> - 2.9.0-3
- fix the python module to work with compressed dictionaries (#972542)
- fix various dictionary lookup errors (#986400, #986401)
- make the library reentrant and fix compilation warnings
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Jun 3 2013 Nalin Dahyabhai <nalin@redhat.com> - 2.9.0-1
- update to 2.9.0 (#970065)
- adds FascistCheckUser()
- go ahead and compress the main dictionary, since we're linking with zlib
anyway
* Tue Jan 29 2013 Nalin Dahyabhai <nalin@redhat.com> - 2.8.22-3
- point cracklib-packer and cracklib-unpacker man pages to cracklib-format
(internal tooling)
* Wed Dec 19 2012 Nalin Dahyabhai <nalin@redhat.com> - 2.8.22-2
- add missing buildrequires: on zlib-devel (#888876)
* Mon Dec 17 2012 Nalin Dahyabhai <nalin@redhat.com> - 2.8.22-1
- update to 2.8.22 (#887461), which now returns an error instead of exiting
when there's a failure opening the dictionary in FascistCheck()
* Thu Dec 13 2012 Nalin Dahyabhai <nalin@redhat.com> - 2.8.21-1
- update to 2.8.21
* Mon Dec 10 2012 Nalin Dahyabhai <nalin@redhat.com> - 2.8.20-1
- update to 2.8.20 (#885439)
* Tue Nov 20 2012 Nalin Dahyabhai <nalin@redhat.com> - 2.8.19-3
- update the copy of the debian source package to one that can currently be
retrieved using the URL we list for it
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.19-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri May 18 2012 Nalin Dahyabhai <nalin@redhat.com> - 2.8.19-1
- update to 2.8.19
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.18-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.18-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Jan 27 2011 Nalin Dahyabhai <nalin@redhat.com> - 2.8.18-1
- update to 2.8.18
- add man pages from Debian (#583932)
- replace zh_CN translation (related to #627449)
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 2.8.16-4
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Sat Jul 3 2010 Dan Horák <dan[at]danny.cz> - 2.8.16-3
- added gettext-autopoint as BR:
* Thu May 20 2010 Nalin Dahyabhai <nalin@redhat.com> - 2.8.16-2
- pull in changes to the Hindi translation (#589188)
* Tue Apr 20 2010 Nalin Dahyabhai <nalin@redhat.com> - 2.8.16-1
- update to 2.8.16
* Fri Jan 22 2010 Nalin Dahyabhai <nalin@redhat.com> - 2.8.15-3
- add passwords derived from rockyou breach data to the dictionaries (Matthew
Miller, #557592)
* Thu Jan 21 2010 Nalin Dahyabhai <nalin@redhat.com> - 2.8.15-2
- update license: tag
- include license file
* Tue Dec 1 2009 Nalin Dahyabhai <nalin@redhat.com> - 2.8.15-1
- update to 2.8.15
- update cracklib-words to the current version (2008-05-07)
- fixup URLs for various dictionary sources that we use
- fix freeing-an-uninitialized-pointer in the python module (SF#2907102)
- add a disttag
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.13-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon May 18 2009 Nalin Dahyabhai <nalin@redhat.com> - 2.8.13-5
- add explicit dependency on gzip for the sake of cracklib-format (Daniel
Mach, #501278)
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.13-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Thu Feb 19 2009 Nalin Dahyabhai <nalin@redhat.com> - 2.8.13-3
- drop trailing "." from the package description for the dicts
subpackage (#225659)
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.8.13-2
- Rebuild for Python 2.6
* Tue Oct 28 2008 Nalin Dahyabhai <nalin@redhat.com> - 2.8.13-1
- update to 2.8.13, which overhauls the python bindings and revises
FascistCheck()'s behavior:
2.8.12 success: returns None, fail: returns error text, other: exceptions
2.8.13 success: returns candidate, fail: throws ValueError, other: exceptions
* Tue Oct 28 2008 Nalin Dahyabhai <nalin@redhat.com> - 2.8.12-3
- fix errors rebuilding with libtool that's newer than the one upstream
has (#467364)
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.8.12-2
- Autorebuild for GCC 4.3

33
sources
View file

@ -1,30 +1,3 @@
16cb1a55d7a2fdf92ca52d89ff1f622e ASSurnames.gz
d5b23f17981b3dff16532e2b2878dcb8 Congress.gz
176684d648b795c599e2125ade7fbe10 Domains.gz
bc7edfe2cc34e80b1a74753b1f215c73 Dosref.gz
922c958fbff2c5428bba5f75bcf4d090 Family-Names.gz
528cd34f1a0537a21d480621f2573527 Ftpsites.gz
4a9086b08e038167cddf0d4609fe046b Given-Names.gz
1e90a81ed180165d2ae3d7e97c47d8b5 Jargon.gz
ffc528048927ed767ba1c5d67c2c1cd1 LCarrol.gz
f45610404e56901d627932895899c6bf Movies.gz
6a6daa254215d18441acb7c72bbe4b01 Paradise.Lost.gz
c575d3302d3a6beb9daef6a492ba024a Python.gz
d2af1d5bfb80515129632a5d5cd106f7 Trek.gz
c262148af56614d9b33946c4758e101b cartoon.gz
5e35a78582c233f8b703f1dabf264788 common-passwords.txt.gz
9296e6866c48522d35440c921dfac538 etc-hosts.gz
056193ded99b178046e87e6fb4300ebf famous.gz
5857e228e763eb8300a8f2d3a424d766 fast-names.gz
67d56b0639e8edeacdf804005cb13afb female-names.gz
2118799e73046f4a386a2e8b8d244d3b male-names.gz
18a1a7c79821701d8c7e8ee1e3d81361 myths-legends.gz
453c3842bb232d50fb45935e18be4250 names.french.gz
ca42f876220de24d5cc1d8f3645b339c names.hp.gz
f70810a2ba08f95df6787afe0eba2907 other-names.gz
a2bd31ce25a3057b61d2e5a1182d93a9 sf.gz
15ec61296de799eaa8111cfabbcbb44f shakespeare.gz
c03b38448aefcde059e6fcfb20784f2c surnames.finnish.gz
6e76a087a646ede5eba05e9259fd84d4 pass_file.gz
d18e670e5df560a8745e1b4dede8f84f cracklib-words.gz
580346fa1012f9d9769192f49d3801fa cracklib-2.8.12.tar.gz
SHA512 (cracklib-2.9.11.tar.gz) = 9e73a715c8f82723abc36b08906e212aaf79a7f6dfa560c6a98963b1e63aa21f7b612f285a639a41ec9eec7025aa2c16f702aad934cd30bc995f470d62ee4bc3
SHA512 (cracklib-words-2.9.11.gz) = d1983e8e8fcb9abee4701581d66008eda2d7ad6ee8d017b7fed225b71bd333fa6199338f37fd120c1c6bf1c8a75025692f4118d97e8c384e578000bed59c6aed
SHA512 (missing-words.gz) = 50afb5538ddd15de997883f5ff6925d9084117851cfdcfc02f05c28304d6c17b46ea669fe626ad819e732b6f291f308194300c9db9b110a5c15a4e5d97ca6caa

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/cracklib/Sanity/ABI-compatibility
# Description: Test if the ABI hasn't changed
# Author: Hubert Kario <hkario@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/cracklib/Sanity/ABI-compatibility
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Hubert Kario <hkario@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test if the ABI hasn't changed" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: cracklib" >> $(METADATA)
@echo "Requires: cracklib cracklib-devel gcc words ltrace" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL3 -RHEL4" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,3 @@
PURPOSE of /CoreOS/cracklib/Sanity/ABI-compatibility
Description: Test if the ABI hasn't changed
Author: Hubert Kario <hkario@redhat.com>

View file

@ -0,0 +1,81 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/cracklib/Sanity/ABI-compatibility
# Description: Test if the ABI hasn't changed
# Author: Hubert Kario <hkario@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="cracklib"
if rlIsRHEL 5; then
PACKAGES="cracklib gcc words ltrace"
else
PACKAGES="cracklib cracklib-devel gcc words ltrace"
fi
rlJournalStart
rlPhaseStartSetup
for PKG in $PACKAGES; do
rlAssertRpm $PKG
done
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "if [ ! -e /usr/share/cracklib/pw_dict.pwi ]; then create-cracklib-dict /usr/share/dict/words; fi" 0 "Create a cracklib dictionary if not already present"
rlRun "pushd $TmpDir"
rlRun "cat > test.c <<_EOF_
#include <stdio.h>
#include <crack.h>
int main(int argc, char **argv)
{
char const *dict = \"/usr/share/cracklib/pw_dict\";
char const *msg = NULL;
msg = FascistCheck(\"AAAAAAAA\", dict);
if (msg == 0)
return 1;
else
{
printf(\"%s\\n\", msg);
return 0;
}
}
_EOF_" 0 "Create test application"
rlPhaseEnd
rlPhaseStartTest
rlRun "gcc -O0 test.c -lcrack -Wall -o test" 0 "Compile the program"
rlRun "./test" 0 "Run the program"
rlRun "ltrace -o ltrace.out ./test" 0 "Run the program with ltrace"
rlRun "grep FascistCheck ltrace.out" 0 "Check if it actually uses the library function"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,63 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/cracklib/Sanity/Localization
# Description: Check if package localization is correct
# Author: Hubert Kario <hkario@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/cracklib/Sanity/Localization
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Hubert Kario <hkario@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Check if package localization is correct" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: cracklib" >> $(METADATA)
@echo "Requires: cracklib" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,3 @@
PURPOSE of /CoreOS/cracklib/Sanity/Localization
Description: Check if package localization is correct
Author: Hubert Kario <hkario@redhat.com>

125
tests/Localization/runtest.sh Executable file
View file

@ -0,0 +1,125 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/cracklib/Sanity/Localization
# Description: Check if package localization is correct
# Author: Hubert Kario <hkario@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="cracklib"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlAssertRpm grep
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest "Sanity"
rlRun "echo 'aVk(|vDTRz$xVE-W6(Z2' | LANG=C cracklib-check | grep ': OK'" 0 "Check if cracklib-check accepts complex passwords"
rlRun "echo AAAAAAAAAAAA | LANG=C cracklib-check | grep ': OK'" 1 "Verify that cracklib-check rejects simple passwords"
rlRun "echo AAAAAAAAAAAA | LANG=C cracklib-check | grep 'DIFFERENT'" 0 "Verify that rejection message contains string 'DIFFERENT'"
rlPhaseEnd
NAME[0]="Assamese"
CODE[0]="as_IN.utf8"
NAME[1]="Bengali"
CODE[1]="bn_IN.utf8"
NAME[2]="German"
CODE[2]="de_DE.utf8"
NAME[3]="Spanish"
CODE[3]="es_ES.utf8"
NAME[4]="French"
CODE[4]="fr_FR.utf8"
NAME[5]="Gujarati"
CODE[5]="gu_IN.utf8"
NAME[6]="Hindi"
CODE[6]="hi_IN.utf8"
NAME[7]="Italian"
CODE[7]="it_IT.utf8"
NAME[8]="Japanese"
CODE[8]="ja_JP.utf8"
NAME[9]="Kannada"
CODE[9]="kn_IN.utf8"
NAME[10]="Korean"
CODE[10]="ko_KR.utf8"
NAME[11]="Malayalam"
CODE[11]="ml_IN.utf8"
NAME[12]="Marathi"
CODE[12]="mr_IN.utf8"
NAME[13]="Oriya"
CODE[13]="or_IN.utf8"
NAME[14]="Punjabi"
CODE[14]="pa_IN.utf8"
NAME[15]="Brazil Portugese"
CODE[15]="pt_BR.utf8"
NAME[16]="Russian"
CODE[16]="ru_RU.utf8"
NAME[17]="Tamil"
CODE[17]="ta_IN.utf8"
NAME[18]="Telugu"
CODE[18]="te_IN.utf8"
NAME[19]="Chinese"
CODE[19]="zh_CN.utf8"
NAME[20]="Taiwanese Chinese"
CODE[20]="zh_TW.utf8"
for i in ${!NAME[@]}; do
rlPhaseStartTest "${NAME[$i]}"
rlRun "echo AAAAAAAAAAAA | LANG=${CODE[$i]} cracklib-check | grep -Ev DIFFERENT\>" 0 "Check if fallback message isn't used"
rlRun "echo AAAAAAAAAAAA | LANG=${CODE[$i]} cracklib-check | grep '???????'" 1 "Check if message isn't clobbered"
rlPhaseEnd
done
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

3
tests/inventory Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
export TEST_DOCKER_EXTRA_ARGS="--security-opt seccomp:unconfined"
exec merge-standard-inventory "$@"

25
tests/tests.yml Normal file
View file

@ -0,0 +1,25 @@
---
# Tests for Docker and Classic Context
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
- container
tests:
- ABI-compatibility
- Localization
required_packages:
- words # required for ABI-compatibility
- cracklib-devel # required for ABI-compatibility
- ltrace # required for ABI-compatibility
- gcc # required for ABI-compatibility
# Tests for Atomic
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- atomic
tests:
- Localization