You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2013/01/04 20:43:38 UTC

svn commit: r1429058 - /spamassassin/trunk/t/SATest.pm

Author: mmartinec
Date: Fri Jan  4 19:43:38 2013
New Revision: 1429058

URL: http://svn.apache.org/viewvc?rev=1429058&view=rev
Log:
Bug 3806: one more case of too generous checking for version of Sys::Hostname::Long

Modified:
    spamassassin/trunk/t/SATest.pm

Modified: spamassassin/trunk/t/SATest.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/SATest.pm?rev=1429058&r1=1429057&r2=1429058&view=diff
==============================================================================
--- spamassassin/trunk/t/SATest.pm (original)
+++ spamassassin/trunk/t/SATest.pm Fri Jan  4 19:43:38 2013
@@ -1004,9 +1004,13 @@ sub can_use_net_dns_safely {
   # on non-Linux unices as root, due to a bug in Sys::Hostname::Long
   # (which is used by Net::DNS)
 
-  return 1 if eval { require Sys::Hostname::Long; Sys::Hostname::Long->VERSION(1.4) };
   return 1 if ($< != 0);
   return 1 if ($^O =~ /^(linux|mswin|dos|os2)/oi);
+
+  my $has_unsafe_hostname =
+    eval { require Sys::Hostname::Long && Sys::Hostname::Long->VERSION < 1.4 };
+  return 1 if !$has_unsafe_hostname;
+
   return;
 }