Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-14 06:13:09 +00:00

winws2: init lua after sandbox init

This commit is contained in:
bol-van
2025-11-23 21:03:39 +03:00
parent 9d49f35324
commit 3b92197bb3

View File

@@ -601,11 +601,6 @@ static int win_main()
return ERROR_TOO_MANY_OPEN_FILES; // code 4 = The system cannot open the file
}
if (!lua_init())
{
res=ERROR_INVALID_PARAMETER; goto ex;
}
if (!win_dark_init(&params.ssid_filter, &params.nlm_filter))
{
DLOG_ERR("win_dark_init failed. win32 error %u (0x%08X)\n", w_win32_error, w_win32_error);
@@ -636,6 +631,13 @@ static int win_main()
res=w_win32_error; goto ex;
}
// init LUA only here because of possible sandbox. no LUA code with high privs
if (!params.L && !lua_init())
{
res=ERROR_INVALID_PARAMETER; goto ex;
}
DLOG_CONDUP("windivert initialized. capture is started.\n");
for (id = 0;; id++)