diff options
Diffstat (limited to 'src/util/debug.c')
-rw-r--r-- | src/util/debug.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/debug.c b/src/util/debug.c index 5b6fccd68..30026dc11 100644 --- a/src/util/debug.c +++ b/src/util/debug.c @@ -132,8 +132,11 @@ int open_debug_file_ex(const char *filename, FILE **filep) if (debug_file && !filep) fclose(debug_file); old_umask = umask(0177); + errno = 0; f = fopen(logpath, "a"); if (f == NULL) { + sss_log(SSS_LOG_EMERG, "Could not open file [%s]. Error: [%d][%s]\n", + logpath, errno, strerror(errno)); free(logpath); return EIO; } |