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;