diff -urNb nmap-5.51/nmap.cc nmap-5.51-logoutputfix/nmap.cc --- nmap-5.51/nmap.cc 2011-02-09 04:37:53.000000000 +0200 +++ nmap-5.51-logoutputfix/nmap.cc 2011-09-13 14:12:45.000000000 +0200 @@ -1287,22 +1287,21 @@ format_ip_options(o.ipoptions, o.ipoptionslen)); } - /* Open the log files, now that we know whether the user wants them appended - or overwritten */ + // Open the log files if (normalfilename) { - log_open(LOG_NORMAL, o.append_output, normalfilename); + log_open(LOG_NORMAL, normalfilename); free(normalfilename); } if (machinefilename) { - log_open(LOG_MACHINE, o.append_output, machinefilename); + log_open(LOG_MACHINE, machinefilename); free(machinefilename); } if (kiddiefilename) { - log_open(LOG_SKID, o.append_output, kiddiefilename); + log_open(LOG_SKID, kiddiefilename); free(kiddiefilename); } if (xmlfilename) { - log_open(LOG_XML, o.append_output, xmlfilename); + log_open(LOG_XML, xmlfilename); free(xmlfilename); } diff -urNb nmap-5.51/output.cc nmap-5.51-logoutputfix/output.cc --- nmap-5.51/output.cc 2011-01-21 02:04:16.000000000 +0200 +++ nmap-5.51-logoutputfix/output.cc 2011-09-13 14:13:59.000000000 +0200 @@ -1061,10 +1061,9 @@ fflush(stderr); } -/* Open a log descriptor of the type given to the filename given. If - append is nonzero, the file will be appended instead of clobbered if - it already exists. If the file does not exist, it will be created */ -int log_open(int logt, int append, char *filename) { +/* Open a log descriptor of the type given to the filename given. If the file + does not exist, it will be created. */ +int log_open(int logt, char *filename) { int i = 0; if (logt <= 0 || logt > LOG_FILE_MASK) return -1; diff -urNb nmap-5.51/output.h nmap-5.51-logoutputfix/output.h --- nmap-5.51/output.h 2011-01-21 02:04:16.000000000 +0200 +++ nmap-5.51-logoutputfix/output.h 2011-09-13 14:13:17.000000000 +0200 @@ -180,10 +180,9 @@ corresponding logs immediately */ void log_flush_all(); -/* Open a log descriptor of the type given to the filename given. If - append is nonzero, the file will be appended instead of clobbered if - it already exists. If the file does not exist, it will be created */ -int log_open(int logt, int append, char *filename); +/* Open a log descriptor of the type given to the filename given. If the file + does not exist, it will be created. */ +int log_open(int logt, char *filename); /* Output the list of ports scanned to the top of machine parseable logs (in a comment, unfortunately). The items in ports should be