diff --git a/CHANGELOG b/CHANGELOG
index 8fc51d45c..04f640860 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,11 @@
# Nmap Changelog ($Id$); -*-text-*-
+o The conditions for printing OS fingerprints to XML output are now
+ the same as are used to decide whether to print them in the other
+ formats. So they will be printed if submission is desirable,
+ otherwise they are only printed if debuging is enabled or verbosity
+ is 2 or higher. [Tom Sellers]
+
o Fix Ncat compilation with the MingW windows compiler. [Gisle Vanem]
Nmap 4.85BETA2 [2009-1-29]
diff --git a/output.cc b/output.cc
index d659338bb..db641edc8 100644
--- a/output.cc
+++ b/output.cc
@@ -1584,6 +1584,13 @@ static void write_merged_fpr(const FingerPrintResults *FPR,
bool isGoodFP, bool wrapit) {
log_write(LOG_NORMAL|LOG_SKID_NOXLT|LOG_STDOUT, "TCP/IP fingerprint:\n%s\n",
merge_fpr(FPR, currenths, isGoodFP, wrapit));
+
+ /* Added code here to print fingerprint to XML file any time it would be printed
+ to any other output format */
+ char *xml_osfp = xml_convert(merge_fpr(FPR, currenths, isGoodFP, wrapit));
+ log_write(LOG_XML,"\n", xml_osfp);
+ free(xml_osfp);
+
}
/* Prints the formatted OS Scan output to stdout, logfiles, etc (but only
@@ -1706,12 +1713,6 @@ void printosscanoutput(Target *currenths) {
assert(0);
}
- if (o.debugging || o.verbose) {
- char *xml_osfp = xml_convert(merge_fpr(FPR, currenths, reason != NULL, reason != NULL));
- log_write(LOG_XML,"\n", xml_osfp);
- free(xml_osfp);
- }
-
log_write(LOG_XML, "\n");
if (currenths->seq.lastboot) {