]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Support %% in external ACL format
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 2 Dec 2011 08:28:17 +0000 (01:28 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 2 Dec 2011 08:28:17 +0000 (01:28 -0700)
src/cf.data.pre
src/external_acl.cc

index a09251da4e77a474ade3332783c9eff77494f3f3..a591a862a7644e12e692abeef99b566d4c14adea 100644 (file)
@@ -490,6 +490,9 @@ DOC_START
                        list separator. ; can be any non-alphanumeric
                        character.
 
+         %%            The percent sign. Useful for helpers which need
+                       an unchanging input format.
+
        In addition to the above, any string specified in the referencing
        acl will also be included in the helper request line, after the
        specified formats (see the "acl external" directive)
index 8a6869cd432d66fc0582ce30f21722636ceaa188..c91339f8a444de9ce077bcc414b4b3e6ba501261 100644 (file)
@@ -169,6 +169,7 @@ struct _external_acl_format {
         EXT_ACL_USER_CERTCHAIN_RAW,
 #endif
         EXT_ACL_EXT_USER,
+        EXT_ACL_PERCENT,
         EXT_ACL_END
     } type;
     external_acl_format *next;
@@ -420,6 +421,8 @@ parse_externalAclHelper(external_acl ** list)
 #endif
         else if (strcmp(token, "%EXT_USER") == 0)
             format->type = _external_acl_format::EXT_ACL_EXT_USER;
+        else if (strcmp(token, "%%") == 0)
+            format->type = _external_acl_format::EXT_ACL_PERCENT;
         else {
             self_destruct();
         }
@@ -992,6 +995,10 @@ makeExternalAclKey(ACLFilledChecklist * ch, external_acl_data * acl_data)
             str = request->extacl_user.termedBuf();
             break;
 
+        case _external_acl_format::EXT_ACL_PERCENT:
+            str = "%";
+            break;
+
         case _external_acl_format::EXT_ACL_UNKNOWN:
 
         case _external_acl_format::EXT_ACL_END: