]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Phil Oester <kernel@linuxace.com>
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 7 Feb 2011 12:19:41 +0000 (05:19 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 7 Feb 2011 12:19:41 +0000 (05:19 -0700)
Bug 3115: logging segfaults if access_log is set to a directory

src/logfile.cc

index 1db6d3985adaa382b864c057be42c6232cb714f5..3c83aae5f7d3a83e14036bca6b31bc0c740efac4 100644 (file)
@@ -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;