summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-01-06 09:26:49 +1100
committerAmitay Isaacs <amitay@gmail.com>2012-01-06 11:04:49 +1100
commitf8163195b083d0c2bff25a6078224605d37562e1 (patch)
tree61f5d4690fe6ac02df75c472b615976f66f0833c /source4
parentd583df12056f29bb2582691494ea887dcfe28b4a (diff)
downloadsamba-f8163195b083d0c2bff25a6078224605d37562e1.tar.gz
samba-f8163195b083d0c2bff25a6078224605d37562e1.tar.bz2
samba-f8163195b083d0c2bff25a6078224605d37562e1.zip
s4-rpc:dnsserver: Do not replace @ with zone_name in update operation
This fixes the problem when updating DNS record for '@' or domain name.
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/dnsserver/dcerpc_dnsserver.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/rpc_server/dnsserver/dcerpc_dnsserver.c b/source4/rpc_server/dnsserver/dcerpc_dnsserver.c
index 5f4009bafe..fac99e1cb6 100644
--- a/source4/rpc_server/dnsserver/dcerpc_dnsserver.c
+++ b/source4/rpc_server/dnsserver/dcerpc_dnsserver.c
@@ -1852,7 +1852,12 @@ static WERROR dnsserver_update_record(struct dnsserver_state *dsstate,
tmp_ctx = talloc_new(mem_ctx);
W_ERROR_HAVE_NO_MEMORY(tmp_ctx);
- name = dns_split_node_name(tmp_ctx, node_name, z->name);
+ /* If node_name is @ or zone name, dns record is @ */
+ if (strcmp(node_name, "@") == 0 || strcmp(node_name, z->name) == 0) {
+ name = talloc_strdup(tmp_ctx, "@");
+ } else {
+ name = dns_split_node_name(tmp_ctx, node_name, z->name);
+ }
W_ERROR_HAVE_NO_MEMORY_AND_FREE(name, tmp_ctx);
if (add_buf != NULL) {