From: Amos Jeffries Date: Mon, 7 Feb 2011 12:19:41 +0000 (-0700) Subject: Author: Phil Oester X-Git-Tag: SQUID_3_1_11~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc5471410906f51344288146e90c098272327067;p=thirdparty%2Fsquid.git Author: Phil Oester Bug 3115: logging segfaults if access_log is set to a directory --- diff --git a/src/logfile.cc b/src/logfile.cc index 1db6d3985a..3c83aae5f7 100644 --- a/src/logfile.cc +++ b/src/logfile.cc @@ -128,6 +128,8 @@ logfileOpen(const char *path, size_t bufsz, int fatal_flag) "\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, 1, "logfileOpen: " << path << ": " << xstrerror()); return NULL;