]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix sslcrtd and external_acl helper name lifetimes (#843)
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 16 Jun 2021 07:30:29 +0000 (07:30 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Tue, 29 Jun 2021 05:28:02 +0000 (17:28 +1200)
    helperShutdown: <binary garbage> #Hlpr523 shutting down.
    helperShutdown: See example.net/legal-terms #Hlpr4456 shutting down.

Busy "class helper" objects often outlive configuration that was used to
create them. Ideally, the supplied helper category name should be copied
and maintained by the helper object itself, but that long-term solution
requires a lot more work (TODO) due to out-of-scope bugs.

src/external_acl.cc
src/helper.h
src/ssl/helper.cc

index 8fe376f6ced0f70cdb2e4089642dc40e0bd1b151..f134c26cf46be7cca8d135ba65855d199c9b8352 100644 (file)
@@ -1115,7 +1115,7 @@ externalAclInit(void)
             p->cache = hash_create((HASHCMP *) strcmp, hashPrime(1024), hash4);
 
         if (!p->theHelper)
-            p->theHelper = new helper(p->name);
+            p->theHelper = new helper("external_acl_type");
 
         p->theHelper->cmdline = p->cmdline;
 
index 1233dff7a79756d79cbcfed8850a2f28d4babff7..5e4bf6fedbee9cd1342c6cfbae276b724bd93645 100644 (file)
@@ -65,6 +65,7 @@ class helper
     CBDATA_CLASS(helper);
 
 public:
+    /// \param name admin-visible helper category (with this process lifetime)
     inline helper(const char *name) :
         cmdline(NULL),
         id_name(name),
index 7ca059e211b826081903053efa7f8ad8e29180a3..c3c3b5fab441bd21c010e0593790d51e293390ce 100644 (file)
@@ -81,7 +81,7 @@ void Ssl::Helper::Init()
     if (!found)
         return;
 
-    ssl_crtd = new helper(Ssl::TheConfig.ssl_crtd);
+    ssl_crtd = new helper("sslcrtd_program");
     ssl_crtd->childs.updateLimits(Ssl::TheConfig.ssl_crtdChildren);
     ssl_crtd->ipc_type = IPC_STREAM;
     // The crtd messages may contain the eol ('\n') character. We are