diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-28 12:33:34 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-28 12:33:34 +0100 |
commit | a109540436f05ea4e67c50b4a2517023bd6b144b (patch) | |
tree | f0bd21091660b6da1621199cb1c4888d6f44cc31 /src/lua/lua_common.c | |
parent | 8a1e8bbfdf47102bb9f25cf58d4f171b54124b2c (diff) | |
download | rspamd-a109540436f05ea4e67c50b4a2517023bd6b144b.tar.gz rspamd-a109540436f05ea4e67c50b4a2517023bd6b144b.zip |
[Feature] Add execution of lua global functions script
Diffstat (limited to 'src/lua/lua_common.c')
-rw-r--r-- | src/lua/lua_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c index 4563d9f84..ad77b0602 100644 --- a/src/lua/lua_common.c +++ b/src/lua/lua_common.c @@ -14,6 +14,7 @@ * limitations under the License. */ #include "lua_common.h" +#include "lua/global_functions.lua.h" /* Lua module init function */ #define MODULE_INIT_FUNC "module_init" @@ -244,6 +245,11 @@ rspamd_lua_init () 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)); + } + return L; } |