From 35310219b4718de1ede0e9e2c951d60dbfd3024e Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 6 Oct 2009 07:18:31 +0000 Subject: [PATCH] Updated nSRecord handling -Add a trailing dot at the end of nSRecords - for full qualified host names only git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14531 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../dns/admin/systems/services/dns/class_servDNSeditZone.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc index 67f2c0df0..cc1daff37 100644 --- a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc +++ b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc @@ -548,8 +548,10 @@ class servdnseditZone extends plugin $ret['sOAmail'] = preg_replace("/\@/",".",$this->sOAmail); foreach(array("sOAprimary","zoneName","sOAmail") as $attr){ + + // Append trailing dots if we've full qualified host names. if(!preg_match("/\.$/",$ret[$attr])){ - if(!tests::is_ip($ret[$attr])){ + if(!tests::is_ip($ret[$attr]) && preg_match("/\./",$ret[$attr])){ $ret[$attr] = $ret[$attr]."."; } } -- 2.30.2