commit 8b4384d: [Minor] Settings: Implement implicit enable of the symbols

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Jun 24 11:35:06 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-06-24 12:31:54 +0100
URL: https://github.com/rspamd/rspamd/commit/8b4384d70b0a94313fb5299485750dcd94d18ed2 (HEAD -> master)

[Minor] Settings: Implement implicit enable of the symbols

---
 src/libserver/rspamd_symcache.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

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


More information about the Commits mailing list