]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Avoid errors when parsing manager ACL in old squid.conf
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 23 Oct 2015 05:36:51 +0000 (22:36 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 23 Oct 2015 05:36:51 +0000 (22:36 -0700)
ACL manager is now a built-in definition and has a different type. That
has been causing FATAL errors when parsing old squid.conf. We can be
nicer and just ignore the obsolete config lines.

src/acl/Acl.cc

index 81602c6682abdb2d029b2b397900e3ca640a302c..f2711897525d3703cdad76c4240597aa4121ddd7 100644 (file)
@@ -244,6 +244,10 @@ ACL::ParseAclLine(ConfigParser &parser, ACL ** head)
         }
         theType = "localport";
         debugs(28, DBG_IMPORTANT, "UPGRADE: ACL 'myport' type is has been renamed to 'localport' and matches the port the client connected to.");
+    } else if (strcmp(theType, "proto") == 0 && strcmp(aclname, "manager") == 0) {
+        // ACL manager is now a built-in and has a different type.
+        debugs(28, DBG_PARSE_NOTE(DBG_IMPORTANT), "UPGRADE: ACL 'manager' is now a built-in ACL. Remove it from your config file.");
+        return; // ignore the line
     }
 
     if (!Prototype::Registered(theType)) {