From 98d4bee8e5919e88536cf1fd6f5da0b474405429 Mon Sep 17 00:00:00 2001 From: batrick Date: Thu, 8 Apr 2010 20:36:43 +0000 Subject: [PATCH] global bug fixes --- nselib/http.lua | 2 +- nselib/rpc.lua | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nselib/http.lua b/nselib/http.lua index f50fc3401..71af93196 100644 --- a/nselib/http.lua +++ b/nselib/http.lua @@ -886,7 +886,7 @@ local build_request = function(host, port, method, path, options) mod_options.header["Content-Length"] = #options.content end if options.cookies then - local cookies = buildCookies(cookies, path) + local cookies = buildCookies(options.cookies, path) if #cookies > 0 then mod_options.header["Cookie"] = cookies end diff --git a/nselib/rpc.lua b/nselib/rpc.lua index fdafdb3d7..561f6f637 100644 --- a/nselib/rpc.lua +++ b/nselib/rpc.lua @@ -375,7 +375,7 @@ Mount = { -- @return entries table containing a list of share names (strings) Export = function( self ) - local catch = function() socket:close() end + local catch = function() self.socket:close() end local try = nmap.new_try(catch) local msg_type = 0 local prg_mount = Util.ProgNameToNumber("mountd") @@ -490,7 +490,7 @@ Mount = { -- @return fhandle string containing the filehandle of the remote export Mount = function( self, path ) - local catch = function() socket:close() end + local catch = function() self.socket:close() end local try = nmap.new_try(catch) local packet, data local prog_id = Util.ProgNameToNumber("mountd") @@ -564,7 +564,7 @@ Mount = { -- @return error string containing error if status is false Unmount = function( self, path ) - local catch = function() socket:close() end + local catch = function() self.socket:close() end local try = nmap.new_try(catch) local packet, data local prog_id = Util.ProgNameToNumber("mountd") @@ -924,7 +924,7 @@ NFS = { -- GetAttrDecode = function( self, data, pos ) local attrib = {} - local catch = function() socket:close() end + local catch = function() self.socket:close() end local try = nmap.new_try(catch) local NFS_OK = 0 local status @@ -1012,7 +1012,7 @@ NFS = { -- total_blocks, free_blocks and available_blocks -- StatFsDecode = function( self, data, pos ) - local catch = function() socket:close() end + local catch = function() self.socket:close() end local try = nmap.new_try(catch) local statfs = {} local NFS_OK, NSFERR_ACCESS = 0, 13