From 5e736e6ca636e19c022f18be2294039bce666d58 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Jul 19 2007 14:06:35 +0000 Subject: - update to 2.8.10 --- diff --git a/.cvsignore b/.cvsignore index 7fe41ce..2c2c93a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -35,3 +35,4 @@ cracklib-2.8.5.tar.gz cracklib-2.8.6.tar.gz cracklib-2.8.9.tar.gz pass_file.gz +cracklib-2.8.10.tar.gz diff --git a/cracklib-2.8.10-docstring.patch b/cracklib-2.8.10-docstring.patch index cd2f020..3ba871c 100644 --- a/cracklib-2.8.10-docstring.patch +++ b/cracklib-2.8.10-docstring.patch @@ -1,5 +1,6 @@ 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 diff --git a/cracklib-2.8.10-suffix.patch b/cracklib-2.8.10-suffix.patch index c012e38..150fdb4 100644 --- a/cracklib-2.8.10-suffix.patch +++ b/cracklib-2.8.10-suffix.patch @@ -1,6 +1,7 @@ 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 diff --git a/cracklib-2.8.9-docstring.patch b/cracklib-2.8.9-docstring.patch deleted file mode 100644 index 1933854..0000000 --- a/cracklib-2.8.9-docstring.patch +++ /dev/null @@ -1,38 +0,0 @@ -Some docstrings for the Python module. Need to figure out how to fix the -summary in the help() output. - -diff -ur cracklib-2.8.9/python/cracklibmodule.c cracklib-2.8.9/python/cracklibmodule.c ---- cracklib-2.8.9/python/cracklibmodule.c 2007-01-29 17:28:41.000000000 -0500 -+++ cracklib-2.8.9/python/cracklibmodule.c 2007-01-29 17:20:14.000000000 -0500 -@@ -24,7 +24,6 @@ - static PyObject * - cracklib_FascistCheck(PyObject *self, PyObject *args, PyObject *kwargs) - { -- int i; - char *candidate, *dict, *dictfile; - const char *result; - struct stat st; -@@ -96,12 +95,21 @@ - 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"); - } diff --git a/cracklib-2.8.9-suffix.patch b/cracklib-2.8.9-suffix.patch deleted file mode 100644 index 97de5d5..0000000 --- a/cracklib-2.8.9-suffix.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- 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 - -+#define DICT_SUFFIX ".pwd" -+ - static PyObject * - cracklib_FascistCheck(PyObject *self, PyObject *args, PyObject *kwargs) - { - int i; -- char *candidate, *dict; -+ char *candidate, *dict, *dictfile; - const char *result; - struct stat st; - char *keywords[] = {"pw", "dictpath", NULL}; -@@ -52,17 +54,26 @@ cracklib_FascistCheck(PyObject *self, Py - "second argument was not an absolute path!"); - return NULL; - } -- if (lstat(dict, &st) == -1) -+ dictfile = malloc(strlen(dict) + sizeof(DICT_SUFFIX)); -+ if (dictfile == NULL) -+ { -+ 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; - } -+ free(dictfile); - } else - { -- if (lstat(DEFAULT_CRACKLIB_DICT ".pwd", &st) == -1) -+ if (lstat(DEFAULT_CRACKLIB_DICT DICT_SUFFIX, &st) == -1) - { - PyErr_SetFromErrnoWithFilename(PyExc_OSError, -- DEFAULT_CRACKLIB_DICT); -+ DEFAULT_CRACKLIB_DICT DICT_SUFFIX); - return NULL; - } - } diff --git a/cracklib.spec b/cracklib.spec index f24f2c9..f744d22 100644 --- a/cracklib.spec +++ b/cracklib.spec @@ -3,8 +3,8 @@ Summary: A password-checking library Name: cracklib -Version: 2.8.9 -Release: 11 +Version: 2.8.10 +Release: 1 Group: System Environment/Libraries Source0: http://prdownloads.sourceforge.net/cracklib/cracklib-%{version}.tar.gz @@ -42,9 +42,9 @@ Source36: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/surnames.finnish. # No upstream source for this; it came in as a bugzilla attachment. Source37: pass_file.gz -Patch0: cracklib-2.8.9-suffix.patch +Patch0: cracklib-2.8.10-suffix.patch Patch1: cracklib-2.8.9-inttypes.patch -Patch2: cracklib-2.8.9-docstring.patch +Patch2: cracklib-2.8.10-docstring.patch URL: http://sourceforge.net/projects/cracklib/ License: Artistic Buildroot: %{_tmppath}/%{name}-%{version}-root @@ -184,6 +184,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libcrack.la %{_libdir}/python*/site-packages/cracklibmodule.so %changelog +* Thu Jul 19 2007 Nalin Dahyabhai - 2.8.10-1 +- update to 2.8.10 + * 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 diff --git a/sources b/sources index 651af29..64aeabe 100644 --- a/sources +++ b/sources @@ -25,6 +25,6 @@ f70810a2ba08f95df6787afe0eba2907 other-names.gz a2bd31ce25a3057b61d2e5a1182d93a9 sf.gz 15ec61296de799eaa8111cfabbcbb44f shakespeare.gz c03b38448aefcde059e6fcfb20784f2c surnames.finnish.gz -9a8c9eb26b48787c84024ac779f64bb2 cracklib-2.8.9.tar.gz 6e76a087a646ede5eba05e9259fd84d4 pass_file.gz d18e670e5df560a8745e1b4dede8f84f cracklib-words.gz +555f7832b63ebc7fb70b0373500c2358 cracklib-2.8.10.tar.gz