]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Settings: Implement implicit enable of the symbols
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 24 Jun 2019 11:31:54 +0000 (12:31 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 24 Jun 2019 11:31:54 +0000 (12:31 +0100)
src/libserver/rspamd_symcache.c

index aa83024b2b3fd43be0f530e0399cbff62fb21703..4cb44cc33d464c50e2a644636304c29313c14d72 100644 (file)
@@ -1466,6 +1466,7 @@ rspamd_symcache_is_item_allowed (struct rspamd_task *task,
                                                 what,
                                                 item->symbol,
                                                 id);
+
                        return FALSE;
                }
 
@@ -1474,6 +1475,15 @@ rspamd_symcache_is_item_allowed (struct rspamd_task *task,
                                !rspamd_symcache_check_id_list (&item->allowed_ids,
                                                id)) {
 
+                               if (task->settings_elt->policy == RSPAMD_SETTINGS_POLICY_IMPLICIT_ALLOW) {
+                                       msg_debug_cache_task ("allow execution of %s settings id %ud "
+                                                                                 "allows implicit execution of the symbols",
+                                                       item->symbol,
+                                                       id);
+
+                                       return TRUE;
+                               }
+
                                if (exec_only) {
                                        /*
                                         * Special case if any of our virtual children are enabled