commit dbe77ff: [Minor] Exclude virtual symbols when doing static checks

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Jul 1 10:56:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-07-01 11:50:27 +0100
URL: https://github.com/rspamd/rspamd/commit/dbe77ff6ecd18b43d520addbcc88217170c1d85b (HEAD -> master)

[Minor] Exclude virtual symbols when doing static checks

---
 src/libserver/rspamd_symcache.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c
index 59423368e..2cd1d1277 100644
--- a/src/libserver/rspamd_symcache.c
+++ b/src/libserver/rspamd_symcache.c
@@ -1441,14 +1441,21 @@ rspamd_symcache_is_item_allowed (struct rspamd_task *task,
 		if (!item->enabled) {
 			msg_debug_cache_task ("skipping check of %s as it is permanently disabled",
 					item->symbol);
+
+			return FALSE;
 		}
 		else {
-			msg_debug_cache_task ("skipping check of %s as it cannot be "
-						 "executed for this task type",
-					item->symbol);
-		}
+			/*
+			 * Exclude virtual symbols
+			 */
+			if (exec_only) {
+				msg_debug_cache_task ("skipping check of %s as it cannot be "
+									  "executed for this task type",
+						item->symbol);
 
-		return FALSE;
+				return FALSE;
+			}
+		}
 	}
 
 	if (!exec_only) {


More information about the Commits mailing list