cracklib/cracklib-2.8.13-suffix.patch

23 lines
1.1 KiB
Diff

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;
}
}