diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-06-24 12:31:54 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-06-24 12:31:54 +0100 |
commit | 8b4384d70b0a94313fb5299485750dcd94d18ed2 (patch) | |
tree | 4cff6ee37d966a1733ad14fbe2f9f7069ca2a13d | |
parent | 3d5281ec7b5f97763ec92555492a322127dc4bb4 (diff) | |
download | rspamd-8b4384d70b0a94313fb5299485750dcd94d18ed2.tar.gz rspamd-8b4384d70b0a94313fb5299485750dcd94d18ed2.zip |
[Minor] Settings: Implement implicit enable of the symbols
-rw-r--r-- | src/libserver/rspamd_symcache.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c index aa83024b2..4cb44cc33 100644 --- a/src/libserver/rspamd_symcache.c +++ b/src/libserver/rspamd_symcache.c @@ -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 |