Author: yoann
Date: 2009-04-06 13:41:59 +0200 (Mon, 06 Apr 2009)
New Revision: 11117
Modified:
prelude-correlator/trunk/configure.in
prelude-correlator/trunk/plugins/lua/lua.c
Log:
Define PRELUDE_CORRELATOR_LIB_DIR, and make it available from Lua ruleset.
Modified: prelude-correlator/trunk/configure.in
===================================================================
--- prelude-correlator/trunk/configure.in 2009-04-06 11:41:54 UTC (rev 11116)
+++ prelude-correlator/trunk/configure.in 2009-04-06 11:41:59 UTC (rev 11117)
@@ -152,8 +152,8 @@
PRELUDE_CORRELATOR_CONF=$SYSCONFDIR/prelude-correlator/prelude-correlator.conf
AC_SUBST(PRELUDE_CORRELATOR_CONF)
-PRELUDE_CORRELATOR_CONTEXT_DIR=$LOCALSTATEDIR/lib/prelude-correlator
-AC_SUBST(PRELUDE_CORRELATOR_CONTEXT_DIR)
+PRELUDE_CORRELATOR_LIB_DIR=$LOCALSTATEDIR/lib/prelude-correlator
+$AC_SUBST(PRELUDE_CORRELATOR_LIB_DIR)
PRELUDE_CORRELATOR_CONFDIR=$SYSCONFDIR/prelude-correlator
AC_SUBST(PRELUDE_CORRELATOR_CONFDIR)
@@ -161,13 +161,13 @@
CORRELATION_PLUGIN_DIR=$LIBDIR/prelude-correlator
AC_SUBST(CORRELATION_PLUGIN_DIR)
-
LUA_DATADIR="$DATADIR/prelude-correlator/lua"
AC_SUBST(LUA_DATADIR)
AC_DEFINE_UNQUOTED(PRELUDE_CORRELATOR_CONF, "$PRELUDE_CORRELATOR_CONF", Path to Prelude-Correlator configuration file)
-AC_DEFINE_UNQUOTED(PRELUDE_CORRELATOR_CONTEXT_DIR, "$PRELUDE_CORRELATOR_CONTEXT_DIR", Path to Prelude-Correlator runtime file)
+AC_DEFINE_UNQUOTED(PRELUDE_CORRELATOR_LIB_DIR, "$PRELUDE_CORRELATOR_LIB_DIR", Path to Prelude-Correlator runtime data)
+
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
Modified: prelude-correlator/trunk/plugins/lua/lua.c
===================================================================
--- prelude-correlator/trunk/plugins/lua/lua.c 2009-04-06 11:41:54 UTC (rev 11116)
+++ prelude-correlator/trunk/plugins/lua/lua.c 2009-04-06 11:41:59 UTC (rev 11117)
@@ -173,8 +173,6 @@
return -1;
}
-
-
while ( (dh = readdir(dir)) ) {
if ( ! (ext = strstr(dh->d_name, ".lua")) )
continue;
@@ -237,6 +235,9 @@
prelude_plugin_instance_set_plugin_data(context, new);
+ lua_pushstring(new->lstate, PRELUDE_CORRELATOR_LIB_DIR);
+ lua_setglobal(new->lstate, "PRELUDE_CORRELATOR_LIB_DIR");
+
return 0;
}
_______________________________________________
Prelude-cvslog site list
[email protected]
http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.