From c8f79b8afe3bc9f4b378502ffb910c2932d9d013 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 26 Mar 2011 06:48:27 +0000 Subject: [PATCH] Remove the current directory from nmap_fetchfile. --- nmap.cc | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/nmap.cc b/nmap.cc index 2c4b59115..322e668c9 100644 --- a/nmap.cc +++ b/nmap.cc @@ -2730,11 +2730,10 @@ int nmap_fetchfile(char *filename_returned, int bufferlen, const char *file) { then the directory the nmap binary is in then the directory the nmap binary is in plus "../share/nmap" then we try NMAPDATADIR/file <--NMAPDATADIR - finally we try ./file -- or on Windows -- - --datadir -> $NMAPDIR -> nmap.exe directory -> NMAPDATADIR -> . + --datadir -> $NMAPDIR -> nmap.exe directory -> NMAPDATADIR */ /* Check the map of requested data file names. */ @@ -2828,17 +2827,6 @@ int nmap_fetchfile(char *filename_returned, int bufferlen, const char *file) { } } - if (!foundsomething) { - res = Snprintf(filename_returned, bufferlen, "./%s", file); - if (res > 0 && res < bufferlen) { - foundsomething = fileexistsandisreadable(filename_returned); - } - } - - if (!foundsomething) { - filename_returned[0] = '\0'; - } - if (foundsomething && o.debugging > 1) log_write(LOG_PLAIN, "Fetchfile found %s\n", filename_returned);