From 8274752db10100ee224d08d935de582ea04ce744 Mon Sep 17 00:00:00 2001 From: Derek Jennings Date: Sat, 31 Aug 2013 22:13:01 +0100 Subject: fix detection of invalid domain names --- NEWS | 2 ++ common/Wizcommon.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e8f66c28..0c364bd3 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- fix detection of invalid domain names + Version 3.9.1 - 29 Aug 2013, by djennings - copy bind templates if not present (mga#10981) diff --git a/common/Wizcommon.pm b/common/Wizcommon.pm index 34a94f48..f09341f8 100644 --- a/common/Wizcommon.pm +++ b/common/Wizcommon.pm @@ -72,7 +72,7 @@ sub test_host_domain { if ($SHORTHOSTNAME =~ /localhost/) { return 0, N("You need to readjust your hostname. 'localhost' is not a correct hostname for a DNS server. Hostname must be a FQDN: Fully Qualified Domain Name"); } - if (member($DOMAINNAME, qw(localdomain (none))) && -z $DOMAINNAME) { + if (member($DOMAINNAME, qw(localdomain (none))) || $DOMAINNAME eq '') { return 0, N("You need to readjust your domainname. For a DNS server you need a correct domainname, not equal to localdomain or none. Hostname must be a FQDN: Fully Qualified Domain Name. Launch drakconnect to adjust it."); } return 1; -- cgit v1.2.1