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
This commit is contained in:
batrick 2010-01-21 18:56:30 +00:00
parent 929042a690
commit b6d57382e3

View file

@ -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";