rpms/cracklib/devel cracklib-2.8.10-suffix.patch,NONE,1.1

Nalin Somabhai Dahyabhai (nalin) fedora-extras-commits at redhat.com
Thu Jul 19 14:04:04 UTC 2007


Author: nalin

Update of /cvs/pkgs/rpms/cracklib/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11868

Added Files:
	cracklib-2.8.10-suffix.patch 
Log Message:
- include the dictionary filename suffix in error messages


cracklib-2.8.10-suffix.patch:

--- NEW FILE cracklib-2.8.10-suffix.patch ---
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.
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;
         }
     }




More information about the fedora-extras-commits mailing list