@@ -21,6 +21,7 @@ config['regexp'] = {} | |||
local local_conf = rspamd_paths['CONFDIR'] | |||
local local_rules = rspamd_paths['RULESDIR'] | |||
dofile(local_rules .. '/global_functions.lua') | |||
dofile(local_rules .. '/regexp/headers.lua') | |||
dofile(local_rules .. '/regexp/lotto.lua') | |||
dofile(local_rules .. '/regexp/fraud.lua') |
@@ -170,7 +170,6 @@ TARGET_LINK_LIBRARIES(rspamd-server rspamd-zstd) | |||
IF (ENABLE_CLANG_PLUGIN MATCHES "ON") | |||
ADD_DEPENDENCIES(rspamd-server rspamd-clang) | |||
ENDIF() | |||
ADD_DEPENDENCIES(rspamd-server rspamd_lua_preprocess) | |||
ADD_EXECUTABLE(rspamd ${RSPAMDSRC} ${CMAKE_CURRENT_BINARY_DIR}/workers.c) | |||
SET_TARGET_PROPERTIES(rspamd PROPERTIES LINKER_LANGUAGE C) |
@@ -27,11 +27,4 @@ SET(LUASRC ${CMAKE_CURRENT_SOURCE_DIR}/lua_common.c | |||
${CMAKE_CURRENT_SOURCE_DIR}/lua_cryptobox.c | |||
${CMAKE_CURRENT_SOURCE_DIR}/lua_map.c) | |||
SET(RSPAMD_LUA ${LUASRC} PARENT_SCOPE) | |||
SET(RSPAMDMLUASRC "${CMAKE_CURRENT_SOURCE_DIR}/global_functions.lua") | |||
ADD_CUSTOM_TARGET(rspamd_lua_preprocess | |||
${PERL_EXECUTABLE} | |||
"${CMAKE_SOURCE_DIR}/lua_preprocess.pl" | |||
"${CMAKE_CURRENT_SOURCE_DIR}" | |||
"${CMAKE_CURRENT_BINARY_DIR}" | |||
SOURCES ${RSPAMDMLUASRC} ${CMAKE_SOURCE_DIR}/lua_preprocess.pl) | |||
SET(RSPAMD_LUA ${LUASRC} PARENT_SCOPE) |
@@ -14,7 +14,6 @@ | |||
* limitations under the License. | |||
*/ | |||
#include "lua_common.h" | |||
#include "lua/global_functions.lua.h" | |||
#include "lptree.h" | |||
#include "utlist.h" | |||
#include <math.h> | |||
@@ -302,11 +301,6 @@ rspamd_lua_init () | |||
rspamd_lua_new_class (L, "rspamd{worker}", worker_reg); | |||
rspamd_lua_add_preload (L, "ucl", luaopen_ucl); | |||
if (luaL_dostring (L, rspamadm_script_global_functions) != 0) { | |||
msg_err ("cannot execute lua global script: %s", | |||
lua_tostring (L, -1)); | |||
} | |||
/* Add plugins global */ | |||
lua_newtable (L); | |||
lua_setglobal (L, "rspamd_plugins"); |