]> 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)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 16 Jun 2021 07:30:32 +0000 (07:30 +0000)
    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 86873baf960c530ca87e7146a08171fe78c76e25..fb3163d1f44ba2232c4be020567030740ae46878 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 054835cc22ce58ce7b39ec426eacaf2783d1cd2d..c50e6b1a335831d5744edeb7b66a3fa9b6f9b964 100644 (file)
@@ -86,7 +86,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