summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jennings <djennings@mageia.org>2013-08-30 23:50:00 +0100
committerDerek Jennings <djennings@mageia.org>2013-08-30 23:50:00 +0100
commit97d3e66da6d3aba9036de0716756909fcda009e1 (patch)
tree8425d92c221bf66d82b1a95d33b5438957f41c35
parent29c66a23e8ef9071685e2b13ab2cfb8250b07f8c (diff)
downloaddrakwizard-97d3e66da6d3aba9036de0716756909fcda009e1.tar
drakwizard-97d3e66da6d3aba9036de0716756909fcda009e1.tar.gz
drakwizard-97d3e66da6d3aba9036de0716756909fcda009e1.tar.bz2
drakwizard-97d3e66da6d3aba9036de0716756909fcda009e1.tar.xz
drakwizard-97d3e66da6d3aba9036de0716756909fcda009e1.zip
fix detection of invalid domain names
-rw-r--r--NEWS2
-rw-r--r--common/Wizcommon.pm2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index a04c111d..90019d4b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- fix detection of invalid domain names
+
Version 3.11 - 30 Aug 2013, by Derek Jennings
- use reload_or_restart for bind also
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;