]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
lua: remove lua as a compile time feature
authorJason Ish <jason.ish@oisf.net>
Wed, 1 May 2024 20:44:52 +0000 (14:44 -0600)
committerJason Ish <jason.ish@oisf.net>
Mon, 27 May 2024 22:44:54 +0000 (16:44 -0600)
Its always built-in. However, can be disabled at runtime.

43 files changed:
.github/workflows/build-centos-7.yml
.github/workflows/commits.yml
.github/workflows/formatting.yml
configure.ac
rust/Cargo.toml.in
rust/Makefile.am
rust/src/dns/mod.rs
rust/src/lib.rs
rust/src/nfs/mod.rs
rust/src/smb/mod.rs
scripts/dnp3-gen/dnp3-gen.py
src/detect-dns-query.c
src/detect-engine-content-inspection.c
src/detect-lua-extensions.c
src/detect-lua-extensions.h
src/detect-lua.c
src/detect-lua.h
src/detect-parse.c
src/output-lua.c
src/runmodes.c
src/suricata.c
src/util-lua-common.c
src/util-lua-common.h
src/util-lua-dnp3-objects.c
src/util-lua-dnp3.c
src/util-lua-dnp3.h
src/util-lua-dns.c
src/util-lua-dns.h
src/util-lua-hassh.c
src/util-lua-hassh.h
src/util-lua-http.c
src/util-lua-http.h
src/util-lua-ja3.c
src/util-lua-ja3.h
src/util-lua-sandbox.c
src/util-lua-smtp.c
src/util-lua-smtp.h
src/util-lua-ssh.c
src/util-lua-ssh.h
src/util-lua-tls.c
src/util-lua-tls.h
src/util-lua.c
src/util-lua.h

index c1d55bd0261d0c673a73f0d18367008021602f7c..9a1d680360a22616b23a3998bd8ca3ee7de3e533 100644 (file)
@@ -168,7 +168,7 @@ jobs:
           git -c advice.detachedHead=false checkout FETCH_HEAD
 
       - run: ./autogen.sh
-      - run: ./configure --enable-warnings --disable-lua
+      - run: ./configure --enable-warnings
       - run: make -j ${{ env.CPUS }}
       - run: python3 ./suricata-verify/run.py -q --debug-failed
       - run: make install-full
index 5a5a7b1fd38fa697eeb82c738b4e50e5908849e1..6ef42507e3896006b8d437aa52673752a6a99e04 100644 (file)
@@ -88,7 +88,7 @@ jobs:
               git checkout $rev
               echo "Building rev ${rev}" | tee -a build_log.txt
               ./autogen.sh >> build_log.txt 2>&1
-              CC="sccache gcc" ./configure --enable-warnings --enable-unittests --disable-lua >> build_log.txt 2>&1
+              CC="sccache gcc" ./configure --enable-warnings --enable-unittests >> build_log.txt 2>&1
               if ! make -j2 >> build_log.txt 2>&1; then
                   echo "::error ::Failed to build rev ${rev}"
                   tail -n 50 build_log.txt
index ebfa464ae9732625ba9317e2f35c709c70fe8a81..4758b1af4413ee1f8ba86cc2faa44b53cbdbc355 100644 (file)
@@ -130,7 +130,7 @@ jobs:
         shell: bash {0}
       - run: git clone https://github.com/OISF/libhtp -b 0.5.x
       - run: ./autogen.sh
-      - run: ./configure --enable-warnings --enable-unittests --disable-lua
+      - run: ./configure --enable-warnings --enable-unittests
       - name: Check formatting
         run: |
           ./scripts/clang-format.sh check-branch --diffstat --show-commits  >> check_formatting_log.txt 2>&1
index c58cf7d869d64e4ea91cf830de98ebced5f2ac6c..daad418208bc040033e7e760be4d539f73527223 100644 (file)
         fi
     fi
 
-  # Lua support, always enabled
-  # TODO: Update the code to not require this.
-    AC_DEFINE([HAVE_LUA], [1], [lua support available])
-    AM_CONDITIONAL([HAVE_LUA], [true])
-
   # libmaxminddb
     AC_ARG_ENABLE(geoip,
             AS_HELP_STRING([--enable-geoip],[Enable GeoIP2 support]),
@@ -2502,7 +2497,6 @@ SURICATA_BUILD_CONF="Suricata Configuration:
   hiredis support:                         ${enable_hiredis}
   hiredis async with libevent:             ${enable_hiredis_async}
   PCRE jit:                                ${pcre2_jit_available}
-  LUA support:                             ${enable_lua}
   GeoIP2 support:                          ${enable_geoip}
   JA3 support:                             ${enable_ja3}
   JA4 support:                             ${enable_ja4}
index 65f2a7523a9abe5d8121cf89032c14dbf8dffa1f..bb1553b5cac39a13534f054dc2f1a695d61664b8 100644 (file)
@@ -17,7 +17,6 @@ name = "suricata"
 debug = true
 
 [features]
-lua = []
 strict = []
 debug = []
 debug-validate = []
index b90d0332f526b6a89e9209bba0932afa7ed7923f..410dab7609b2b962e1a91628672e305c0d3d64fb 100644 (file)
@@ -14,10 +14,6 @@ if RUST_BUILD_STD
 NIGHTLY_ARGS = -Z build-std
 endif
 
-if HAVE_LUA
-RUST_FEATURES +=       lua $(LUA_INT8)
-endif
-
 if HAVE_JA3
 RUST_FEATURES +=       ja3
 endif
index b0ca00ffc9d489b9f9d5d905f4728c6abf6c136c..3a572a82111f46621aa9feba55c04fd303dd0384 100644 (file)
@@ -21,6 +21,4 @@ pub mod detect;
 pub mod dns;
 pub mod log;
 pub mod parser;
-
-#[cfg(feature = "lua")]
 pub mod lua;
index 0b705d3c3ffa828147c94bf3688c105100017e7a..01a4b9352ee94ac4e1d516a83617616635fece63 100644 (file)
@@ -86,7 +86,6 @@ pub mod detect;
 
 pub mod ja4;
 
-#[cfg(feature = "lua")]
 pub mod lua;
 
 pub mod dns;
index 2f6fe84df917ef0b294bb74f25c9be43f8856fc0..6efa61096a0ad8ea8582349fe64fb6cf1007e2e2 100644 (file)
@@ -28,6 +28,3 @@ pub mod nfs2;
 pub mod nfs3;
 pub mod nfs4;
 pub mod log;
-
-//#[cfg(feature = "lua")]
-//pub mod lua;
index 5b74f1ca4e028e5a5cea29249606f4cf2c261edf..18ceef5bd91b1980caa9caef4ed8e203dccb406a 100644 (file)
@@ -42,6 +42,3 @@ pub mod events;
 pub mod auth;
 pub mod files;
 pub mod funcs;
-
-//#[cfg(feature = "lua")]
-//pub mod lua;
index 3c14f1eb9c309253831856c5ca002ab9c365b2f7..53341074d7bc7d338e9507cef16375479ddf93b9 100755 (executable)
@@ -59,8 +59,6 @@ util_lua_dnp3_objects_c_template = """/* Copyright (C) 2015 Open Information Sec
 #include "app-layer-dnp3.h"
 #include "app-layer-dnp3-objects.h"
 
-#ifdef HAVE_LUA
-
 #include <lua.h>
 #include <lualib.h>
 #include <lauxlib.h>
@@ -120,8 +118,6 @@ void DNP3PushPoint(lua_State *luastate, DNP3Object *object,
     }
 }
 
-#endif /* HAVE_LUA */
-
 """
 
 output_json_dnp3_objects_template = """/* Copyright (C) 2015 Open Information Security Foundation
index 2cf0f7610f4f9b1c1604a87d9fc613d9c3c1318d..ef510f15287a1c33dbf12d8bc94f1cd57d0420e0 100644 (file)
@@ -116,7 +116,6 @@ void DetectDnsQueryRegister (void)
 
     g_dns_query_buffer_id = DetectBufferTypeGetByName("dns_query");
 
-#ifdef HAVE_LUA
     /* register these generic engines from here for now */
     DetectAppLayerInspectEngineRegister(
             "dns_request", ALPROTO_DNS, SIG_FLAG_TOSERVER, 1, DetectEngineInspectGenericList, NULL);
@@ -125,9 +124,7 @@ void DetectDnsQueryRegister (void)
 
     DetectBufferTypeSetDescriptionByName("dns_request",
             "dns requests");
-    DetectBufferTypeSetDescriptionByName("dns_response",
-            "dns responses");
-#endif
+    DetectBufferTypeSetDescriptionByName("dns_response", "dns responses");
 }
 
 
index a4fa5c72b7d7d4e46040f4fa0e5249fa3d9a2601..0e78d4ae85df0873713ea39595f57a25f25cbf39 100644 (file)
@@ -62,9 +62,7 @@
 #include "util-unittest-helper.h"
 #include "util-profiling.h"
 
-#ifdef HAVE_LUA
 #include "util-lua.h"
-#endif
 
 #ifdef UNITTESTS
 thread_local uint32_t ut_inspection_recursion_counter = 0;
@@ -650,7 +648,6 @@ static int DetectEngineContentInspectionInternal(DetectEngineThreadCtx *det_ctx,
             goto match;
         }
         goto no_match_discontinue;
-#ifdef HAVE_LUA
     }
     else if (smd->type == DETECT_LUA) {
         SCLogDebug("lua starting");
@@ -663,7 +660,6 @@ static int DetectEngineContentInspectionInternal(DetectEngineThreadCtx *det_ctx,
         }
         SCLogDebug("lua match");
         goto match;
-#endif /* HAVE_LUA */
     } else if (smd->type == DETECT_BASE64_DECODE) {
         if (DetectBase64DecodeDoMatch(det_ctx, s, smd, buffer, buffer_len)) {
             if (s->sm_arrays[DETECT_SM_LIST_BASE64_DATA] != NULL) {
index da4ec8b5835a0dd635971492773b008c82aae79d..aa2d7a3ae6fc37212306f0b04640c5c01ef7122b 100644 (file)
@@ -59,8 +59,6 @@
 
 #include "app-layer-parser.h"
 
-#ifdef HAVE_LUA
-
 #include "util-lua.h"
 #include "util-lua-common.h"
 #include "util-lua-http.h"
@@ -591,5 +589,3 @@ int LuaRegisterExtensions(lua_State *lua_state)
     LuaRegisterDNP3Functions(lua_state);
     return 0;
 }
-
-#endif /* HAVE_LUA */
index 24b0e8657edebd61dbb042ac5d7086a515473ba7..5923108735d133b5156465c2e76fb071276eac44 100644 (file)
 #ifndef SURICATA_DETECT_LUA_EXT_H
 #define SURICATA_DETECT_LUA_EXT_H
 
-#ifdef HAVE_LUA
 int LuaRegisterExtensions(lua_State *);
 
 void LuaExtensionsMatchSetup(lua_State *lua_state, DetectLuaData *, DetectEngineThreadCtx *det_ctx,
         Flow *f, Packet *p, const Signature *s, uint8_t flags);
 
-#endif /* HAVE_LUA */
 #endif
index 7e2343d07c116835debdccaf9154669ec1b96244..07ebe57e5311c22a7357ebc75e6ebfea02ce6aa8 100644 (file)
 
 #include "util-var-name.h"
 
-#ifndef HAVE_LUA
-
-static int DetectLuaSetupNoSupport (DetectEngineCtx *a, Signature *b, const char *c)
-{
-    SCLogError("no Lua support built in, needed for lua keyword");
-    return -1;
-}
-
-/**
- * \brief Registration function for keyword: lua
- */
-void DetectLuaRegister(void)
-{
-    sigmatch_table[DETECT_LUA].name = "lua";
-    sigmatch_table[DETECT_LUA].desc = "support for lua scripting";
-    sigmatch_table[DETECT_LUA].url = "/rules/rule-lua-scripting.html";
-    sigmatch_table[DETECT_LUA].Setup = DetectLuaSetupNoSupport;
-    sigmatch_table[DETECT_LUA].Free  = NULL;
-    sigmatch_table[DETECT_LUA].flags = SIGMATCH_NOT_BUILT;
-
-       SCLogDebug("registering lua rule option");
-    return;
-}
-
-#else /* HAVE_LUA */
-
 #include "util-lua.h"
 #include "util-lua-sandbox.h"
 
@@ -2448,4 +2422,3 @@ void DetectLuaRegisterTests(void)
     UtRegisterTest("LuaMatchTest06a", LuaMatchTest06a);
 }
 #endif
-#endif /* HAVE_LUA */
index 34762b2901c96f7a9d7c030a3606dec28e4ab389..b2ab6b9df5795c366d86e33cc400930adffbe6d6 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef SURICATA_DETECT_LUA_H
 #define SURICATA_DETECT_LUA_H
 
-#ifdef HAVE_LUA
-
 #include "util-lua.h"
 #include "util-lua-sandbox.h"
 
@@ -60,8 +58,6 @@ typedef struct DetectLuaData {
     int allow_restricted_functions;
 } DetectLuaData;
 
-#endif /* HAVE_LUA */
-
 /* prototypes */
 void DetectLuaRegister (void);
 int DetectLuaMatchBuffer(DetectEngineThreadCtx *det_ctx,
index fc5e4f6579f23eef4d59aae4793971d155e64d22..4d159a8832eed5307dd08c093631a3f0c87e9245 100644 (file)
@@ -2076,9 +2076,7 @@ static int SigValidate(DetectEngineCtx *de_ctx, Signature *s)
             }
         }
     }
-#ifdef HAVE_LUA
     DetectLuaPostSetup(s);
-#endif
 
     if ((s->init_data->init_flags & SIG_FLAG_INIT_JA) && s->alproto != ALPROTO_UNKNOWN &&
             s->alproto != ALPROTO_TLS && s->alproto != ALPROTO_QUIC) {
index d2f35e8053d1f98c6c5c0d8772e62fd178002188..8e42043e36ecb4b3fa0cb22d5f78b1bd5b4f3aa8 100644 (file)
@@ -25,7 +25,6 @@
 #include "suricata-common.h"
 #include "output-lua.h"
 
-#ifdef HAVE_LUA
 #include "util-print.h"
 #include "util-unittest.h"
 #include "util-debug.h"
@@ -888,11 +887,3 @@ void LuaLogRegister(void) {
     /* register as separate module */
     OutputRegisterModule(MODULE_NAME, "lua", OutputLuaLogInit);
 }
-
-#else /* HAVE_LUA */
-
-void LuaLogRegister (void) {
-    /* no-op */
-}
-
-#endif /* HAVE_LUA */
index fb489973acfb75f0f8fef162d94c6400bec52b17..a8bfea030961a64bc56bd1268cceaa1b473a16a2 100644 (file)
@@ -829,13 +829,6 @@ void RunModeInitializeOutputs(void)
         } else if (strncmp(output->val, "unified2-", sizeof("unified2-") - 1) == 0) {
             SCLogWarning("Unified2 is no longer supported.");
             continue;
-        } else if (strcmp(output->val, "lua") == 0) {
-#ifndef HAVE_LUA
-            SCLogWarning("lua support not compiled in. Reconfigure/"
-                         "recompile with lua(jit) and its development "
-                         "files installed to add lua support.");
-            continue;
-#endif
         } else if (strcmp(output->val, "dns-log") == 0) {
             SCLogWarning("dns-log is not longer available as of Suricata 5.0");
             continue;
index e29a3a0177003fa49a46d4fd5927acd0f8a3fcaf..48a51b815f4b3487d82614db5ea04ad220f42141 100644 (file)
@@ -740,9 +740,8 @@ static void PrintBuildInfo(void)
     strlcat(features, "HAVE_NSS ", sizeof(features));
     /* HTTP2_DECOMPRESSION is not an optional feature in this major version */
     strlcat(features, "HTTP2_DECOMPRESSION ", sizeof(features));
-#ifdef HAVE_LUA
+    /* Lua is now vendored in and always available. */
     strlcat(features, "HAVE_LUA ", sizeof(features));
-#endif
 #ifdef HAVE_JA3
     strlcat(features, "HAVE_JA3 ", sizeof(features));
 #endif
index 0be1f5071f6c9bba56955c4e276b7071202c50af..0d6b173e2c07f870d52d11a1bf0684e5a1b4715c 100644 (file)
@@ -48,8 +48,6 @@
 #include "util-time.h"
 #include "util-conf.h"
 
-#ifdef HAVE_LUA
-
 #include <lua.h>
 #include <lualib.h>
 #include <lauxlib.h>
@@ -1004,7 +1002,4 @@ int LuaStateNeedProto(lua_State *luastate, AppProto alproto)
     flow_alproto = flow->alproto;
 
     return (alproto == flow_alproto);
-
 }
-
-#endif /* HAVE_LUA */
index c7a23a04305f02845372f0e946211e8c7af1b47d..5d6ea41f4be4224cee7b66b96c822423135a2a6c 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef SURICATA_UTIL_LUA_COMMON_H
 #define SURICATA_UTIL_LUA_COMMON_H
 
-#ifdef HAVE_LUA
-
 int LuaCallbackError(lua_State *luastate, const char *msg);
 const char *LuaGetStringArgument(lua_State *luastate, int argc);
 
@@ -37,6 +35,4 @@ int LuaRegisterFunctions(lua_State *luastate);
 
 int LuaStateNeedProto(lua_State *luastate, AppProto alproto);
 
-#endif /* HAVE_LUA */
-
 #endif /* SURICATA_UTIL_LUA_COMMON_H */
index 27bbc535190199f371295e0fae5cc87247a252c3..ae3bac9eb4615616c537d0bddba9e0d7fc0938af 100644 (file)
@@ -27,8 +27,6 @@
 #include "app-layer-dnp3.h"
 #include "app-layer-dnp3-objects.h"
 
-#ifdef HAVE_LUA
-
 #include <lua.h>
 #include <lualib.h>
 #include <lauxlib.h>
@@ -3539,5 +3537,3 @@ void DNP3PushPoint(lua_State *luastate, DNP3Object *object,
             break;
     }
 }
-
-#endif /* HAVE_LUA */
index 09f8694d6c1542785904442c07375b3631e3ca04..39602a74a322aef9612e7cec90d51be7d6f1b57b 100644 (file)
@@ -20,8 +20,6 @@
 #include "app-layer-dnp3.h"
 #include "app-layer-dnp3-objects.h"
 
-#ifdef HAVE_LUA
-
 #include <lua.h>
 #include <lualib.h>
 #include <lauxlib.h>
@@ -197,5 +195,3 @@ int LuaRegisterDNP3Functions(lua_State *luastate)
 
     return 0;
 }
-
-#endif /* HAVE_LUA */
index 4b656599f0005908b014f066b8a9344eb2618cf6..a594fbfbe8c1f0b92a09b9115f1950adb831f53d 100644 (file)
 #ifndef SURICATA_UTIL_LUA_DNP3_H
 #define SURICATA_UTIL_LUA_DNP3_H
 
-#ifdef HAVE_LUA
-
 int LuaRegisterDNP3Functions(lua_State *);
 
-#endif /* HAVE_LUA */
-
 #endif /* !SURICATA_UTIL_LUA_DNP3_H */
index 3d19d9308e2ef8b1e448a6e61bfaf8faf5f77ddd..b1eafbb0eb481a2adce5da0cc4cf2c934f3de34c 100644 (file)
@@ -47,8 +47,6 @@
 #include "util-time.h"
 #include "rust.h"
 
-#ifdef HAVE_LUA
-
 #include <lua.h>
 #include <lualib.h>
 #include <lauxlib.h>
@@ -158,5 +156,3 @@ int LuaRegisterDnsFunctions(lua_State *luastate)
     lua_setglobal(luastate, "DnsGetRecursionDesired");
     return 0;
 }
-
-#endif /* HAVE_LUA */
index f9bdc0b2901590e4891d8f0958e250328d23b636..99566cabf1a5a1a1cae49e7bf7129c2026f51003 100644 (file)
 #ifndef SURICATA_UTIL_LUA_DNS_H
 #define SURICATA_UTIL_LUA_DNS_H
 
-#ifdef HAVE_LUA
-
 int LuaRegisterDnsFunctions(lua_State *luastate);
 
-#endif /* HAVE_LUA */
-
 #endif /* __UTIL_LUA_HTTP_H__ */
index 631268d1b4581801dbd8f0c8674c533daa4ebbe3..d2594701229ffa64157bcac0a6d6323f8c180092 100644 (file)
@@ -47,8 +47,6 @@
 #include "util-logopenfile.h"
 #include "util-time.h"
 
-#ifdef HAVE_LUA
-
 #include <lua.h>
 #include <lualib.h>
 #include <lauxlib.h>
@@ -215,5 +213,3 @@ int LuaRegisterHasshFunctions(lua_State *luastate)
     
     return 0;
 }
-
-#endif /* HAVE_LUA */
index 733233542e9f73a85833436c55b6051b30a094ea..d5156663e316f15f2e1ef8b2a6c44086d3b7605b 100644 (file)
 #ifndef SURICATA_UTIL_LUA_HASSH_H
 #define SURICATA_UTIL_LUA_HASSH_H
 
-#ifdef HAVE_LUA
-
 int LuaRegisterHasshFunctions(lua_State *luastate);
 
-#endif /* HAVE_LUA */
-
 #endif /* SURICATA_UTIL_LUA_HASSH_H */
index e04c168fa6eaf24d7efe096cfd5918496783cba2..2a52afb46b97ca7fb14fa2df6cef8507febffae9 100644 (file)
@@ -46,8 +46,6 @@
 #include "util-logopenfile.h"
 #include "util-time.h"
 
-#ifdef HAVE_LUA
-
 #include <lua.h>
 #include <lualib.h>
 #include <lauxlib.h>
@@ -349,5 +347,3 @@ int LuaRegisterHttpFunctions(lua_State *luastate)
     lua_setglobal(luastate, "HttpGetResponseBody");
     return 0;
 }
-
-#endif /* HAVE_LUA */
index 1e44c8599f36462be4cb03f482db242b32e94569..d6b0d43b7541170ebe96550e7a5402010100904c 100644 (file)
 #ifndef SURICATA_UTIL_LUA_HTTP_H
 #define SURICATA_UTIL_LUA_HTTP_H
 
-#ifdef HAVE_LUA
-
 int LuaRegisterHttpFunctions(lua_State *luastate);
 
-#endif /* HAVE_LUA */
-
 #endif /* SURICATA_UTIL_LUA_HTTP_H */
index 1faed68f56a0e233cbcb60c70e53c8ffaf98d917..cdb508fcf65ed7987ba300e1a43033eddee22ac2 100644 (file)
@@ -47,8 +47,6 @@
 #include "util-logopenfile.h"
 #include "util-time.h"
 
-#ifdef HAVE_LUA
-
 #include <lua.h>
 #include <lualib.h>
 #include <lauxlib.h>
@@ -168,5 +166,3 @@ int LuaRegisterJa3Functions(lua_State *luastate)
 
     return 0;
 }
-
-#endif /* HAVE_LUA */
index 84deb160a7f23a41c240f852a1c4bb5ae5874057..0bbbb666b2b781ba52f50fb032e17485bfd7d832 100644 (file)
 #ifndef SURICATA_UTIL_LUA_JA3_H
 #define SURICATA_UTIL_LUA_JA3_H
 
-#ifdef HAVE_LUA
-
 int LuaRegisterJa3Functions(lua_State *luastate);
 
-#endif /* HAVE_LUA */
-
 #endif /* SURICATA_UTIL_LUA_JA3_H */
index 2cb5ae2b7beda96c69f5a92837db3c240b31afb9..49e2b7969e8ec71f4c22c6f472f729162786d368 100644 (file)
 
 #include "suricata-common.h"
 
-#ifdef HAVE_LUA
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include "lua.h"
-
 #include "lauxlib.h"
 #include "lualib.h"
 
+#include "util-debug.h"
+#include "util-validate.h"
 #include "util-lua-sandbox.h"
 
-#if !defined(SANDBOX_ALLOC_CTX)
 #define SANDBOX_CTX "SANDBOX_CTX"
-#endif
 
 typedef struct BlockedFunction {
     const char *module;
@@ -66,6 +59,7 @@ static void *LuaAlloc(void *ud, void *ptr, size_t osize, size_t nsize)
     if (nsize == 0) {
         if (ptr != NULL) {
             // ASSERT: alloc_bytes > osize
+            DEBUG_VALIDATE_BUG_ON(ctx->alloc_bytes < osize);
             ctx->alloc_bytes -= osize;
         }
         SCFree(ptr);
@@ -334,5 +328,3 @@ static int OpenSandbox(lua_State *L)
     luaL_newlib(L, sblib);
     return 1;
 }
-
-#endif
index a0ecf815d98be0a86dd844a5fb8391db6a37f80c..e8e3eb7aaac7a15e48e1c28bc7f757f2e45e93c2 100644 (file)
@@ -36,8 +36,6 @@
 
 #include "app-layer-smtp.h"
 
-#ifdef HAVE_LUA
-
 #include <lua.h>
 #include <lualib.h>
 
@@ -338,5 +336,3 @@ int LuaRegisterSmtpFunctions(lua_State *luastate)
 
     return 0;
 }
-
-#endif /* HAVE_LUA */
index 6c695051c313c77dc9b9263f31de4ef1027d4345..8172a663f965327222031a97212ac506f8634b99 100644 (file)
 #ifndef SURICATA_UTIL_LUA_SMTP_H
 #define SURICATA_UTIL_LUA_SMTP_H
 
-#ifdef HAVE_LUA
-
 int LuaRegisterSmtpFunctions(lua_State *luastate);
 
-#endif /* HAVE_LUA */
-
 #endif /* SURICATA_UTIL_LUA_SMTP_H */
index 266d3df860b5ea230b94778ce128f5cbac734201..ba9c516dad58d83b7de318a9d48c16903b908050 100644 (file)
@@ -48,8 +48,6 @@
 #include "util-time.h"
 #include "rust.h"
 
-#ifdef HAVE_LUA
-
 #include <lua.h>
 #include <lualib.h>
 #include <lauxlib.h>
@@ -215,5 +213,3 @@ int LuaRegisterSshFunctions(lua_State *luastate)
 
     return 0;
 }
-
-#endif /* HAVE_LUA */
index 88f9972175257683ebd9ec4645a48676b4e58158..c36ef105acb099534b44342865803054c5e9e91d 100644 (file)
 #ifndef SURICATA_UTIL_LUA_SSH_H
 #define SURICATA_UTIL_LUA_SSH_H
 
-#ifdef HAVE_LUA
-
 int LuaRegisterSshFunctions(lua_State *luastate);
 
-#endif /* HAVE_LUA */
-
 #endif /* SURICATA_UTIL_LUA_SSH_H */
index 9413f42965ca8c0fe64bbe9cb0703089235742f5..698e50acd91964e2f0e9f2605d1ccc46c4b0a8ee 100644 (file)
@@ -47,8 +47,6 @@
 #include "util-logopenfile.h"
 #include "util-time.h"
 
-#ifdef HAVE_LUA
-
 #include <lua.h>
 #include <lualib.h>
 #include <lauxlib.h>
@@ -363,5 +361,3 @@ int LuaRegisterTlsFunctions(lua_State *luastate)
 
     return 0;
 }
-
-#endif /* HAVE_LUA */
index 3e4c08d4357c708cf30d21f4926b29e7079bafa8..69eb2f9f71dda761898c6adf073e70ff00654c34 100644 (file)
 #ifndef SURICATA_UTIL_LUA_TLS_H
 #define SURICATA_UTIL_LUA_TLS_H
 
-#ifdef HAVE_LUA
-
 int LuaRegisterTlsFunctions(lua_State *luastate);
 
-#endif /* HAVE_LUA */
-
 #endif /* SURICATA_UTIL_LUA_TLS_H */
index 900e66401de476af0e1837925b5caa5ec7cfe0e3..3377cc63197e62dd601cf6b91491793f001dcf60 100644 (file)
@@ -47,8 +47,6 @@
 #include "util-logopenfile.h"
 #include "util-time.h"
 
-#ifdef HAVE_LUA
-
 #include <lua.h>
 #include <lualib.h>
 #include <lauxlib.h>
@@ -344,5 +342,3 @@ int LuaPushInteger(lua_State *luastate, lua_Integer n)
     lua_pushinteger(luastate, n);
     return 1;
 }
-
-#endif /* HAVE_LUA */
index dd069384d5d23035123577daa5bbf548e7047167..70e516463819e7fb9209acf9020513fe7aa904b1 100644 (file)
 #ifndef SURICATA_UTIL_LUA_H
 #define SURICATA_UTIL_LUA_H
 
-#ifndef HAVE_LUA
-
-/* If we don't have Lua, create a typedef for lua_State so the
- * exported Lua functions don't fail the build. */
-typedef void lua_State;
-
-#else
-
 #include "lua.h"
 #include "lualib.h"
 #include "lauxlib.h"
@@ -108,6 +100,4 @@ int LuaPushStringBuffer(lua_State *luastate, const uint8_t *input, size_t input_
 
 int LuaPushInteger(lua_State *luastate, lua_Integer n);
 
-#endif /* HAVE_LUA */
-
 #endif /* SURICATA_UTIL_LUA_H */