Workaround postgresql.fingerprint dlog message

Came up as a concern, this special-cases notes of
"postgresql.fingerprint". Not thrilled with this fix, though.
This commit is contained in:
Tod Beardsley 2012-01-11 13:17:21 -06:00
parent 1a03777538
commit 5f121fe181
1 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,12 @@ class Host < ActiveRecord::Base
def validate_fingerprint_data(fp)
if fp.data.kind_of?(Hash) and !fp.data.empty?
return true
elsif fp.ntype == "postgresql.fingerprint"
# Special case postgresql.fingerprint; it's always a string,
# and should not be used for OS fingerprinting (yet), so
# don't bother logging it. TODO: fix os fingerprint finding, this
# name collision seems silly.
return false
else
dlog("Could not validate fingerprint data: #{fp.inspect}")
return false