]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix external dependencies
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Mar 2018 15:50:33 +0000 (15:50 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Mar 2018 15:50:33 +0000 (15:50 +0000)
lualib/lua_squeeze_rules.lua

index 3511c1b194e02a2f715da2994555b0209964b027..9bcccf6f0045844d484dc47e4f16e465a67e5b07 100644 (file)
@@ -169,9 +169,21 @@ exports.squeeze_init = function()
   for parent,children in pairs(squeezed_deps) do
     if not squeezed_symbols[parent] then
       -- Trivial case, external dependnency
-      logger.debugm(SN, rspamd_config, 'register external squeezed dependency on %s',
-          parent)
-      rspamd_config:register_dependency(squeeze_sym, parent, true)
+
+      for s,_ in pairs(children) do
+
+        if squeezed_symbols[s] then
+          -- External dep depends on a squeezed symbol
+          logger.debugm(SN, rspamd_config, 'register external squeezed dependency on %s',
+              parent)
+          rspamd_config:register_dependency(squeeze_sym, parent, true)
+        else
+          -- Generic rspamd symbols dependency
+          logger.debugm(SN, rspamd_config, 'register external dependency %s -> %s',
+              s, parent)
+          rspamd_config:register_dependency(s, parent, true)
+        end
+      end
     else
       -- Not so trivial case
       local ps = squeezed_symbols[parent]