From b6d57382e30fe005822fc0e2326896f93758c9a3 Mon Sep 17 00:00:00 2001 From: batrick Date: Thu, 21 Jan 2010 18:56:30 +0000 Subject: [PATCH] Fix bug where Lua will load original, optional Lua libraries when we have custom libraries that must be used instead. (So, try to load our libaries first, then look through system paths.) This bug is very rare since these optional libraries are very rarely installed in most distributions. Bug found by Onur K. [1]. [1] http://seclists.org/nmap-dev/2010/q1/197 --- nse_main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nse_main.lua b/nse_main.lua index ad78196ba..95f48e1f3 100644 --- a/nse_main.lua +++ b/nse_main.lua @@ -89,7 +89,7 @@ local cnse, rules = ...; -- The NSE C library and Script Rules do -- Append the nselib directory to the Lua search path local t, path = assert(cnse.fetchfile_absolute("nselib/")); assert(t == "directory", "could not locate nselib directory!"); - package.path = package.path..";"..path.."?.lua"; + package.path = path.."?.lua;"..package.path; end local stdnse = require "stdnse";