lua-hooks/ext/all.c in immunio-1.1.13 vs lua-hooks/ext/all.c in immunio-1.1.15
- old
+ new
@@ -46,12 +46,13 @@
{"sysutils", luaopen_sysutils},
{ NULL, NULL }
};
-// In unsafe mode define these as NOPs when we build a .so
-#if !defined(LUA_UNSAFE_MODE)
+// Ruby agent requires these functions to be present.
+// In safe mode, where they are not, we provide a noop.
+#if !defined(LUA_UNSAFE_MODE) && !defined(LUA_NO_MOCK_UNSAFE)
LUALIB_API int luaopen_io(lua_State *L) {
return 0;
}
LUALIB_API int luaopen_os(lua_State *L) {
return 0;
@@ -64,6 +65,5 @@
lua_pushcfunction(L, lib->func);
lua_pushstring(L, lib->name);
lua_call(L, 1, 0);
}
}
-