- report the filename we passed to lstat() when we treat its error return
as an exception
This commit is contained in:
parent
2d55447325
commit
d19d1b26bb
@ -1,22 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
24
cracklib-2.8.15-suffix.patch
Normal file
24
cracklib-2.8.15-suffix.patch
Normal file
@ -0,0 +1,24 @@
|
||||
Where possible, actually use the name of the file that we couldn't find.
|
||||
SF#2907104.
|
||||
|
||||
diff -up cracklib-2.8.15/python/_cracklibmodule.c cracklib-2.8.15/python/_cracklibmodule.c
|
||||
--- cracklib-2.8.15/python/_cracklibmodule.c 2009-11-18 18:58:20.000000000 -0500
|
||||
+++ cracklib-2.8.15/python/_cracklibmodule.c 2009-12-01 15:14:21.000000000 -0500
|
||||
@@ -101,7 +101,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;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ _cracklib_FascistCheck(PyObject *self, P
|
||||
sprintf(dictfile, "%s" DICT_SUFFIX, defaultdict);
|
||||
if (lstat(dictfile, &st) == -1)
|
||||
{
|
||||
- PyErr_SetFromErrnoWithFilename(PyExc_OSError, defaultdict);
|
||||
+ PyErr_SetFromErrnoWithFilename(PyExc_OSError, dictfile);
|
||||
free(defaultdict);
|
||||
free(dictfile);
|
||||
return NULL;
|
Loading…
Reference in New Issue
Block a user