From: Alex Rousskov Date: Wed, 16 Jun 2021 07:30:29 +0000 (+0000) Subject: Fix sslcrtd and external_acl helper name lifetimes (#843) X-Git-Tag: SQUID_6_0_1~322 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91ce75c92ab00d7f11d1876a549c2e1d9a547392;p=thirdparty%2Fsquid.git Fix sslcrtd and external_acl helper name lifetimes (#843) helperShutdown: #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. --- diff --git a/src/external_acl.cc b/src/external_acl.cc index 86873baf96..fb3163d1f4 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -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; diff --git a/src/helper.h b/src/helper.h index 1233dff7a7..5e4bf6fedb 100644 --- a/src/helper.h +++ b/src/helper.h @@ -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), diff --git a/src/ssl/helper.cc b/src/ssl/helper.cc index 054835cc22..c50e6b1a33 100644 --- a/src/ssl/helper.cc +++ b/src/ssl/helper.cc @@ -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