Skip to content

Commit

Permalink
[Minor] Settings: Implement implicit enable of the symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Jun 24, 2019
1 parent 3d5281e commit 8b4384d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/libserver/rspamd_symcache.c
Expand Up @@ -1466,6 +1466,7 @@ rspamd_symcache_is_item_allowed (struct rspamd_task *task,
what,
item->symbol,
id);

return FALSE;
}

Expand All @@ -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
Expand Down

0 comments on commit 8b4384d

Please sign in to comment.