update to 2.8.13, which mainly overhauls the python bindings
This commit is contained in:
		
							parent
							
								
									edf74ee84e
								
							
						
					
					
						commit
						fbf890aaa1
					
				| @ -37,3 +37,4 @@ 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 | ||||
|  | ||||
| @ -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");
 | ||||
|  } | ||||
| @ -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; | ||||
|          } | ||||
|      } | ||||
| @ -1,8 +1,13 @@ | ||||
| --- 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) | ||||
| 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. | ||||
| diff -up cracklib-2.8.13/configure.in cracklib-2.8.13/configure.in
 | ||||
| --- cracklib-2.8.13/configure.in	2008-09-23 07:53:24.000000000 -0400
 | ||||
| +++ cracklib-2.8.13/configure.in	2008-10-28 13:39:08.000000000 -0400
 | ||||
| @@ -26,6 +26,19 @@ AC_CHECK_HEADERS(zlib.h, AC_DEFINE(HAVE_
 | ||||
|   | ||||
|  AC_SEARCH_LIBS(gzopen, z) | ||||
|   | ||||
| +if test x$ac_cv_header_inttypes_h = xyes ; then
 | ||||
| +	CRACKLIB_INTEGER_TYPES1="#include <inttypes.h>"
 | ||||
| @ -20,7 +25,7 @@ | ||||
|  dnl Cygwin workaround | ||||
|  AC_MSG_CHECKING(if LINE_MAX is defined) | ||||
|  AC_EGREP_CPP(yes, | ||||
| @@ -87,6 +100,8 @@
 | ||||
| @@ -90,6 +103,8 @@ AM_CONDITIONAL(BUILD_PYTHON,[test "$buil
 | ||||
|  dnl Handle local dict compiling properly | ||||
|  AC_SUBST(CROSS_COMPILING, $cross_compiling) | ||||
|   | ||||
| @ -31,9 +36,10 @@ | ||||
| +		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 @@
 | ||||
| diff -up cracklib-2.8.13/lib/packer.h.in cracklib-2.8.13/lib/packer.h.in
 | ||||
| --- cracklib-2.8.13/lib/packer.h.in	2008-10-28 13:38:25.000000000 -0400
 | ||||
| +++ cracklib-2.8.13/lib/packer.h.in	2008-10-28 13:38:25.000000000 -0400
 | ||||
| @@ -30,17 +30,8 @@
 | ||||
|  #define _(String) (String) | ||||
|  #endif | ||||
|   | ||||
| @ -53,7 +59,7 @@ | ||||
|   | ||||
|  struct pi_header | ||||
|  { | ||||
| @@ -84,6 +75,9 @@
 | ||||
| @@ -83,6 +74,9 @@ typedef struct {
 | ||||
|  	int dummy; | ||||
|  } PWDICT; | ||||
|   | ||||
							
								
								
									
										22
									
								
								cracklib-2.8.13-suffix.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								cracklib-2.8.13-suffix.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | ||||
| Don't drop the file's extension when naming the file that we couldn't access. | ||||
| diff -up cracklib-2.8.13/python/_cracklibmodule.c cracklib-2.8.13/python/_cracklibmodule.c
 | ||||
| --- cracklib-2.8.13/python/_cracklibmodule.c	2008-10-28 13:17:48.000000000 -0400
 | ||||
| +++ cracklib-2.8.13/python/_cracklibmodule.c	2008-10-28 13:17:54.000000000 -0400
 | ||||
| @@ -100,7 +100,7 @@ _cracklib_FascistCheck(PyObject *self, P
 | ||||
|          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; | ||||
|          } | ||||
| @@ -110,7 +110,7 @@ _cracklib_FascistCheck(PyObject *self, P
 | ||||
|          if (lstat(DEFAULT_CRACKLIB_DICT DICT_SUFFIX, &st) == -1) | ||||
|          { | ||||
|              PyErr_SetFromErrnoWithFilename(PyExc_OSError, | ||||
| -                                           DEFAULT_CRACKLIB_DICT);
 | ||||
| +                                           DEFAULT_CRACKLIB_DICT DICT_SUFFIX);
 | ||||
|              return NULL; | ||||
|          } | ||||
|      } | ||||
| @ -4,8 +4,8 @@ | ||||
| 
 | ||||
| Summary: A password-checking library | ||||
| Name: cracklib | ||||
| Version: 2.8.12 | ||||
| Release: 3 | ||||
| Version: 2.8.13 | ||||
| Release: 1 | ||||
| Group: System Environment/Libraries | ||||
| Source0: http://prdownloads.sourceforge.net/cracklib/cracklib-%{version}.tar.gz | ||||
| 
 | ||||
| @ -43,10 +43,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.10-suffix.patch | ||||
| Patch1: cracklib-2.8.12-inttypes.patch | ||||
| Patch2: cracklib-2.8.10-docstring.patch | ||||
| Patch3: cracklib-2.8.12-gettext.patch | ||||
| Patch0: cracklib-2.8.13-suffix.patch | ||||
| Patch1: cracklib-2.8.13-inttypes.patch | ||||
| Patch2: cracklib-2.8.12-gettext.patch | ||||
| URL: http://sourceforge.net/projects/cracklib/ | ||||
| License: GPLv2 | ||||
| Buildroot: %{_tmppath}/%{name}-%{version}-root | ||||
| @ -108,8 +107,7 @@ If you are installing CrackLib, you should also install cracklib-dicts. | ||||
| %patch0 -p1 -b .suffix | ||||
| cp lib/packer.h lib/packer.h.in | ||||
| %patch1 -p1 -b .inttypes | ||||
| %patch2 -p1 -b .docstring | ||||
| %patch3 -p1 -b .gettext | ||||
| %patch2 -p1 -b .gettext | ||||
| autoreconf -f -i | ||||
| mkdir cracklib-dicts | ||||
| for dict in %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} \ | ||||
| @ -215,6 +213,9 @@ EOF | ||||
| %{_libdir}/python*/site-packages/cracklibmodule.so | ||||
| 
 | ||||
| %changelog | ||||
| * Tue Oct 28 2008 Nalin Dahyabhai <nalin@redhat.com> - 2.8.13-1 | ||||
| - update to 2.8.13, which mainly overhauls the python bindings | ||||
| 
 | ||||
| * 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) | ||||
|  | ||||
							
								
								
									
										2
									
								
								sources
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								sources
									
									
									
									
									
								
							| @ -27,4 +27,4 @@ a2bd31ce25a3057b61d2e5a1182d93a9  sf.gz | ||||
| c03b38448aefcde059e6fcfb20784f2c  surnames.finnish.gz | ||||
| 6e76a087a646ede5eba05e9259fd84d4  pass_file.gz | ||||
| d18e670e5df560a8745e1b4dede8f84f  cracklib-words.gz | ||||
| 580346fa1012f9d9769192f49d3801fa  cracklib-2.8.12.tar.gz | ||||
| 5beb4c6b3c31c83fc98c4c225b25cd94  cracklib-2.8.13.tar.gz | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user