From: Amos Jeffries Date: Fri, 1 May 2015 07:24:56 +0000 (-0700) Subject: Fix 'access_log none' to prevent following logs being used X-Git-Tag: SQUID_3_2_14~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7ee553ea0be25d6ca3ef27ee16891d56dfdbeae;p=thirdparty%2Fsquid.git Fix 'access_log none' to prevent following logs being used The documented behaviour of "access_log none" for preventing logging using log lines following the directive has not been working in Squid-3 for some time. Since the 'none' type does not have a log module associated the entire switch logic where its abort is checked for was being skipped. --- diff --git a/src/log/access_log.cc b/src/log/access_log.cc index d5ff51f851..0aa40aed16 100644 --- a/src/log/access_log.cc +++ b/src/log/access_log.cc @@ -114,6 +114,10 @@ accessLogLogTo(customlog* log, AccessLogEntry::Pointer &al, ACLChecklist * check if (log->aclList && checklist && checklist->fastCheck(log->aclList) != ACCESS_ALLOWED) continue; + // The special-case "none" type has no logfile object set + if (log->type == Log::Format::CLF_NONE) + return; + if (log->logfile) { logfileLineStart(log->logfile); @@ -149,9 +153,6 @@ accessLogLogTo(customlog* log, AccessLogEntry::Pointer &al, ACLChecklist * check break; #endif - case Log::Format::CLF_NONE: - return; // abort! - default: fatalf("Unknown log format %d\n", log->type); break;