aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-21 11:14:25 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-07-21 11:41:06 +0100
commit626d567fecde469490ae893dbe1da2a9bbaa7de0 (patch)
tree1115ba20ab2926cbe2e09d3b8d164fb6828ecb27 /src
parent43a0868d495ce58b1098b071dd3d7020138776c3 (diff)
downloadrspamd-626d567fecde469490ae893dbe1da2a9bbaa7de0.tar.gz
rspamd-626d567fecde469490ae893dbe1da2a9bbaa7de0.zip
[Minor] Set lua cpath to RSPAMD_LIBDIR, not LUALIBDIR
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_common.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
index 2fde26a31..38b6ee81b 100644
--- a/src/lua/lua_common.c
+++ b/src/lua/lua_common.c
@@ -208,7 +208,8 @@ rspamd_lua_set_path (lua_State *L, struct rspamd_config *cfg, GHashTable *vars)
const ucl_object_t *opts;
const gchar *pluginsdir = RSPAMD_PLUGINSDIR,
*rulesdir = RSPAMD_RULESDIR,
- *lualibdir = RSPAMD_LUALIBDIR;
+ *lualibdir = RSPAMD_LUALIBDIR,
+ *libdir = RSPAMD_LIBDIR;
gchar path_buf[PATH_MAX];
@@ -249,6 +250,16 @@ rspamd_lua_set_path (lua_State *L, struct rspamd_config *cfg, GHashTable *vars)
if (t) {
lualibdir = t;
}
+
+ t = g_hash_table_lookup (vars, "LIBDIR");
+ if (t) {
+ libdir = t;
+ }
+
+ t = g_hash_table_lookup (vars, "RSPAMD_LIBDIR");
+ if (t) {
+ libdir = t;
+ }
}
if (additional_path) {
@@ -288,7 +299,7 @@ rspamd_lua_set_path (lua_State *L, struct rspamd_config *cfg, GHashTable *vars)
rspamd_snprintf (path_buf, sizeof (path_buf),
"%s/?.so;"
"%s",
- lualibdir,
+ libdir,
old_path);
lua_pop (L, 1);
lua_pushstring (L, path_buf);