From: Amos Jeffries Date: Mon, 7 Feb 2011 04:32:37 +0000 (-0700) Subject: Author: Phil Oester X-Git-Tag: take03^2~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d470d8857c8302388486711a8925d18e82f501d;p=thirdparty%2Fsquid.git Author: Phil Oester Bug 3115: stdio: log module segfaults if access_log is set to a directory --- diff --git a/src/log/ModStdio.cc b/src/log/ModStdio.cc index e9d704b68c..ec646d35b0 100644 --- a/src/log/ModStdio.cc +++ b/src/log/ModStdio.cc @@ -206,6 +206,8 @@ logfile_mod_stdio_open(Logfile * lf, const char *path, size_t bufsz, int fatal_f "\tThe parent directory must be writeable by the\n" "\tuser '%s', which is the cache_effective_user\n" "\tset in squid.conf.", path, Config.effectiveUser); + } else if (EISDIR == errno && fatal_flag) { + fatalf("Cannot open '%s' because it is a directory, not a file.\n", path); } else { debugs(50, DBG_IMPORTANT, "logfileOpen (stdio): " << path << ": " << xstrerror()); return 0;