From b5c3ec0abc22145841b9b528cb55ec381e9c0d06 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Thu, 6 Dec 2012 16:04:32 +1100 Subject: s4-rpc: dnsserver: Fix removal of trailing '.' in soa mname Signed-off-by: Amitay Isaacs Reviewed-by: Andrew Bartlett --- source4/rpc_server/dnsserver/dnsdata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/rpc_server') diff --git a/source4/rpc_server/dnsserver/dnsdata.c b/source4/rpc_server/dnsserver/dnsdata.c index f0584a9811..87b7d87ae3 100644 --- a/source4/rpc_server/dnsserver/dnsdata.c +++ b/source4/rpc_server/dnsserver/dnsdata.c @@ -412,9 +412,9 @@ struct dnsp_DnssrvRpcRecord *dns_to_dnsp_copy(TALLOC_CTX *mem_ctx, struct DNS_RP len = dns->data.soa.NamePrimaryServer.len; if (dns->data.soa.NamePrimaryServer.str[len-1] == '.') { - dnsp->data.soa.mname = talloc_strdup(mem_ctx, dns->data.soa.NamePrimaryServer.str); - } else { dnsp->data.soa.mname = talloc_strndup(mem_ctx, dns->data.soa.NamePrimaryServer.str, len-1); + } else { + dnsp->data.soa.mname = talloc_strdup(mem_ctx, dns->data.soa.NamePrimaryServer.str); } len = dns->data.soa.ZoneAdministratorEmail.len; -- cgit