diff --git a/cracklib-2.8.9-docstring.patch b/cracklib-2.8.9-docstring.patch index 66a6cb9..1933854 100644 --- a/cracklib-2.8.9-docstring.patch +++ b/cracklib-2.8.9-docstring.patch @@ -9,7 +9,7 @@ diff -ur cracklib-2.8.9/python/cracklibmodule.c cracklib-2.8.9/python/cracklibmo cracklib_FascistCheck(PyObject *self, PyObject *args, PyObject *kwargs) { - int i; - char *candidate, *dict; + char *candidate, *dict, *dictfile; const char *result; struct stat st; @@ -96,12 +95,21 @@ diff --git a/cracklib-2.8.9-suffix.patch b/cracklib-2.8.9-suffix.patch index 0f299b7..97de5d5 100644 --- a/cracklib-2.8.9-suffix.patch +++ b/cracklib-2.8.9-suffix.patch @@ -1,6 +1,6 @@ ---- cracklib-2.8.9/python/cracklibmodule.c 2007-01-25 12:16:30.000000000 -0500 -+++ cracklib-2.8.9/python/cracklibmodule.c 2007-01-25 12:16:32.000000000 -0500 -@@ -19,6 +19,8 @@ +--- cracklib-2.8.9/python/cracklibmodule.c.suffix 2005-09-26 16:42:34.000000000 -0400 ++++ cracklib-2.8.9/python/cracklibmodule.c 2007-06-20 14:16:52.000000000 -0400 +@@ -19,11 +19,13 @@ static pthread_mutex_t cracklib_mutex = #define UNLOCK() #endif @@ -9,15 +9,13 @@ static PyObject * cracklib_FascistCheck(PyObject *self, PyObject *args, PyObject *kwargs) { -@@ -27,6 +29,7 @@ + int i; +- char *candidate, *dict; ++ char *candidate, *dict, *dictfile; const char *result; struct stat st; char *keywords[] = {"pw", "dictpath", NULL}; -+ char *dictfile; - - self = NULL; - candidate = NULL; -@@ -52,14 +55,23 @@ +@@ -52,17 +54,26 @@ cracklib_FascistCheck(PyObject *self, Py "second argument was not an absolute path!"); return NULL; } @@ -25,13 +23,14 @@ + 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, dict); ++ PyErr_SetFromErrnoWithFilename(PyExc_OSError, dictfile); + free(dictfile); return NULL; } @@ -42,4 +41,8 @@ + if (lstat(DEFAULT_CRACKLIB_DICT DICT_SUFFIX, &st) == -1) { PyErr_SetFromErrnoWithFilename(PyExc_OSError, - DEFAULT_CRACKLIB_DICT); +- DEFAULT_CRACKLIB_DICT); ++ DEFAULT_CRACKLIB_DICT DICT_SUFFIX); + return NULL; + } + } diff --git a/cracklib.spec b/cracklib.spec index 70cd3ad..f24f2c9 100644 --- a/cracklib.spec +++ b/cracklib.spec @@ -4,7 +4,7 @@ Summary: A password-checking library Name: cracklib Version: 2.8.9 -Release: 10 +Release: 11 Group: System Environment/Libraries Source0: http://prdownloads.sourceforge.net/cracklib/cracklib-%{version}.tar.gz @@ -184,6 +184,12 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libcrack.la %{_libdir}/python*/site-packages/cracklibmodule.so %changelog +* Wed Jun 20 2007 Nalin Dahyabhai - 2.8.9-11 +- improve reports of out-of-memory exceptions so that they don't include a + bogus filename +- improve reports of file-missing exceptions from the python module so that + they give the right filename (#225858) + * Mon Mar 12 2007 Nalin Dahyabhai - 2.8.9-10 - explicitly include required headers from (#228698) - attempt to provide doc strings in the python module diff --git a/cracklib.spec.fc7 b/cracklib.spec.fc7 deleted file mode 100644 index 57e75e7..0000000 --- a/cracklib.spec.fc7 +++ /dev/null @@ -1,345 +0,0 @@ -# Reflects the values hard-coded in various Makefile.am's in the source tree. -%define dictpath %{_datadir}/cracklib/pw_dict - -Summary: A password-checking library. -Name: cracklib -Version: 2.8.9 -Release: 4 -Group: System Environment/Libraries -Source0: http://prdownloads.sourceforge.net/cracklib/cracklib-%{version}.tar.gz -Source1: http://prdownloads.sourceforge.net/cracklib/cracklib-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 -URL: http://sourceforge.net/projects/cracklib/ -License: Artistic -Buildroot: %{_tmppath}/%{name}-%{version}-root -BuildPrereq: gzip, python-devel, words, automake, libtool -Conflicts: cracklib-dicts < 2.8 - -%description -CrackLib tests passwords to determine whether they match certain -security-oriented characteristics, with the purpose of stopping users -from choosing passwords that are easy to guess. CrackLib performs -several tests on passwords: it tries to generate words from a username -and gecos entry and checks those words against the password; it checks -for simplistic patterns in passwords; and it checks for the password -in a dictionary. - -CrackLib is actually a library containing a particular C function -which is used to check the password, as well as other C -functions. CrackLib is not a replacement for a passwd program; it must -be used in conjunction with an existing passwd program. - -Install the cracklib package if you need a program to check users' -passwords to see if they are at least minimally secure. If you install -CrackLib, you will also want to install the cracklib-dicts package. - -%package dicts -Summary: The standard CrackLib dictionaries. -Group: System Environment/Libraries -BuildRequires: words >= 2-13 - -%description dicts -The cracklib-dicts package includes the CrackLib dictionaries. -CrackLib will need to use the dictionary appropriate to your system, -which is normally put in /usr/share/dict/words. Cracklib-dicts also -contains the utilities necessary for the creation of new dictionaries. - -If you are installing CrackLib, you should also install cracklib-dicts. - -%package devel -Summary: Files needed for developing applications which make use of cracklib. -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -The cracklib-devel package includes the headers and other files which are -needed for developing applications which make use of cracklib. - -%package python -Summary: A binding which allows python scripts to make use of cracklib. -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description python -The cracklib-python package includes a module which allows Python -applications to use cracklib. - -%prep -%setup -q -autoreconf -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} %{SOURCE1} -do - cp -fv ${dict} cracklib-dicts/ -done - -%build -%configure --with-pic --with-python --with-default-dict=%{dictpath} -make - -%clean -[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT - -%install -[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT -./util/cracklib-format cracklib-dicts/* | \ -./util/cracklib-packer $RPM_BUILD_ROOT/%{dictpath} -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 - -toprelpath=.. -touch $RPM_BUILD_ROOT/top -while ! test -f $RPM_BUILD_ROOT/%{_libdir}/$toprelpath/top ; do - toprelpath=../$toprelpath -done -rm -f $RPM_BUILD_ROOT/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 -fi -rm -f $RPM_BUILD_ROOT/%{_libdir}/python*/site-packages/cracklibmodule.*a -rm -f $RPM_BUILD_ROOT/%{_libdir}/libcrack.la - -%find_lang %{name} - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - -%triggerpostun -- cracklib < 2.7-24 -/sbin/ldconfig - -%files -f %{name}.lang -%defattr(-,root,root) -%doc README README-WORDS NEWS doc/LICENCE AUTHORS -%{_libdir}/libcrack.so.* -%dir %{_datadir}/cracklib -%{_datadir}/cracklib/cracklib.magic -%{_sbindir}/*cracklib* - -%files devel -%defattr(-,root,root) -%{_includedir}/* -%{_libdir}/libcrack.so -%{_libdir}/libcrack.a* - -%files dicts -%defattr(-,root,root) -%dir %{_datadir}/cracklib -%{_datadir}/cracklib/pw_dict.* -%{_libdir}/cracklib_dict.* -%{_sbindir}/mkdict -%{_sbindir}/packer - -%files python -%defattr(-,root,root) -%{_libdir}/python*/site-packages/cracklibmodule.so - -%changelog -* Mon Aug 21 2006 Nalin Dahyabhai - 2.8.9-4 -- make the package EXPLODE into smaller packages (#202370,203569) - -* Wed Jul 12 2006 Jesse Keating - 2.8.9-3.1 -- rebuild - -* Mon Jun 12 2006 Jesse Keating - 2.8.9-3 -- Add missing br, automake, libtool (#194738) - -* Tue Apr 25 2006 Nalin Dahyabhai - 2.8.9-2 -- update to 2.8.9 -- only create compat symlinks for the dictionaries if we aren't installing - them into the old locations - -* Fri Feb 10 2006 Jesse Keating - 2.8.6-1.2.1 -- bump again for double-long bug on ppc(64) - -* Tue Feb 07 2006 Jesse Keating - 2.8.6-1.2 -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Mon Nov 7 2005 Nalin Dahyabhai 2.8.6-1 -- update to 2.8.6 -- remove .la file (#172632) - -* Wed Sep 28 2005 Nalin Dahyabhai 2.8.5-2 -- update to 2.8.5 - -* Tue Sep 27 2005 Nalin Dahyabhai 2.8.4-1 -- update to 2.8.4 -- build python module - -* Fri May 13 2005 Nalin Dahyabhai 2.8.3-1 -- update to 2.8.3 - -* Thu Mar 17 2005 Nalin Dahyabhai 2.8.2-1 -- update to 2.8.2 - -* Wed Mar 16 2005 Nalin Dahyabhai 2.8.1-1 -- update to 2.8.1 - - moves dictionary to new default location under %%{_datadir} -- the - dictionary format is the same across all architectures - - renames "packer" to "cracklib-packer" -- conflict with cracklib-dicts < 2.8, where the on-disk format was not - compatible on 64-bit arches due to now-fixed cleanliness bugs -- move binaries for manipulating and checking words against dictionaries - from -dicts into the main package - -* Mon Jan 3 2005 Nalin Dahyabhai 2.7-30 -- rebuild - -* Mon Jan 3 2005 Nalin Dahyabhai 2.7-29 -- correctly build on 64-bit systems (part of #143417) -- patch so that 32- and 64-bit libcrack can read dictionaries which were - incorrectly generated on 64-bit systems of the same endianness (more #143417) -- include a sample cracklib magic file -- stop using /usr/dict/* when building the dictionary -- list words as a build requirement, which it is, instead of a run-time - requirement -- provide a virtual arch-specific dep in cracklib-dicts, require it in - cracklib (part of #143417) - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Tue Mar 02 2004 Elliot Lee -- rebuilt - -* Fri Feb 13 2004 Elliot Lee -- rebuilt - -* Wed Feb 4 2004 Nalin Dahyabhai 2.7-26 -- update URL (previous page moved) (#114894) - -* Fri Jan 30 2004 Nalin Dahyabhai 2.7-25 -- fix ldconfig invocation in trigger for older versions which included the - soname symlink (#114620) - -* Mon Dec 1 2003 Nalin Dahyabhai 2.7-24 -- include packer.h for reading dictionaries directly, since we already include - packer in the -dicts subpackage (#68339) -- don't include the soname symlink in the package, let ldconfig do its job - -* Wed Jun 18 2003 Nalin Dahyabhai 2.7-23 -- rebuild - -* Mon Jun 16 2003 Nalin Dahyabhai 2.7-22 -- rebuild - -* Wed Jun 04 2003 Elliot Lee -- rebuilt - -* Wed Apr 30 2003 Nalin Dahyabhai -- update URL - -* Tue Feb 04 2003 Florian La Roche -- add symlink to shared libs - -* Wed Jan 22 2003 Tim Powers -- rebuilt - -* Wed Sep 25 2002 Nalin Dahyabhai 2.7-19 -- fix for builds on multilib systems (set DICTPATH properly) - -* Fri Jun 21 2002 Tim Powers -- automated rebuild - -* Sun May 26 2002 Tim Powers -- automated rebuild - -* Thu May 9 2002 Nalin Dahyabhai 2.7-16 -- rebuild in new environment - -* Fri Feb 22 2002 Nalin Dahyabhai 2.7-15 -- rebuild - -* Wed Jan 09 2002 Tim Powers -- automated rebuild - -* Tue Oct 2 2001 Nalin Dahyabhai 2.7-13 -- use getpwuid_r instead of getpwuid - -* Fri Aug 3 2001 Nalin Dahyabhai 2.7-12 -- remove cruft that ldconfig already knows how to manage -- don't explicitly strip anything -- the brp setup decides that -- tweak the header so that it can be used in C++ (#46685) -- buildprereq the words package - -* Tue Jun 26 2001 Florian La Roche -- add link from library major version number - -* Sun Jun 24 2001 Elliot Lee -- Bump release + rebuild. - -* Wed Jul 12 2000 Prospector -- automatic rebuild - -* Tue Jun 27 2000 Nalin Dahyabhai -- FHS fixes -- fix undeclared function warnings from the new compiler -- fix URL - -* Fri Apr 07 2000 Trond Eivind Glomsr�d -- switched to use /usr/share/dict/words - -* Tue Apr 06 1999 Preston Brown -- strip binaries - -* Sun Mar 21 1999 Cristian Gafton -- auto rebuild in the new build environment (release 4) - -* Wed Jan 06 1999 Cristian Gafton -- build for glibc 2.1 - -* Sat May 09 1998 Prospector System -- translations modified for de, fr, tr - -* Tue Mar 10 1998 Cristian Gafton -- updated to 2.7 -- build shared libraries - -* Mon Nov 03 1997 Donnie Barnes -- added -fPIC - -* Mon Oct 13 1997 Donnie Barnes -- basic spec file cleanups - -* Mon Jun 02 1997 Erik Troan -- built against glibc