aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-12-20 10:50:19 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-12-20 10:50:19 +0000
commit9d99f58b40d0e0e1561262b1cda3c4259720e296 (patch)
treec4ae53438af1ce3403f17978150b1fb113c9afb1
parent6abb04609d54b45ba7ac285061acdeb122ad0b4c (diff)
downloadrspamd-9d99f58b40d0e0e1561262b1cda3c4259720e296.tar.gz
rspamd-9d99f58b40d0e0e1561262b1cda3c4259720e296.zip
[Rework] Antivirus: Move antivirus routines to lua_scanners
-rw-r--r--lualib/lua_scanners/antivirus.lua (renamed from lualib/lua_antivirus.lua)0
-rw-r--r--lualib/lua_scanners/init.lua26
-rw-r--r--src/plugins/lua/antivirus.lua2
3 files changed, 27 insertions, 1 deletions
diff --git a/lualib/lua_antivirus.lua b/lualib/lua_scanners/antivirus.lua
index 286ef64d0..286ef64d0 100644
--- a/lualib/lua_antivirus.lua
+++ b/lualib/lua_scanners/antivirus.lua
diff --git a/lualib/lua_scanners/init.lua b/lualib/lua_scanners/init.lua
new file mode 100644
index 000000000..5c76ada49
--- /dev/null
+++ b/lualib/lua_scanners/init.lua
@@ -0,0 +1,26 @@
+--[[
+Copyright (c) 2018, Vsevolod Stakhov <vsevolod@highsecure.ru>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+]]--
+
+--[[[
+-- @module lua_scanners
+-- This module contains external scanners functions
+--]]
+
+local exports = {
+ antivirus = require "antivirus",
+}
+
+return exports \ No newline at end of file
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua
index ed3d93e79..b32771ddd 100644
--- a/src/plugins/lua/antivirus.lua
+++ b/src/plugins/lua/antivirus.lua
@@ -18,7 +18,7 @@ local rspamd_logger = require "rspamd_logger"
local rspamd_regexp = require "rspamd_regexp"
local lua_util = require "lua_util"
local fun = require "fun"
-local lua_antivirus = require "lua_antivirus"
+local lua_antivirus = require("lua_scanners").antivirus
local redis_params
local N = "antivirus"