s4-rpc: dnsserver: Allow . to be specified for @ record
authorAmitay Isaacs <amitay@gmail.com>
Mon, 28 Jul 2014 03:07:58 +0000 (13:07 +1000)
committerKarolin Seeger <kseeger@samba.org>
Thu, 7 Aug 2014 14:43:09 +0000 (16:43 +0200)
Windows allow both . and @ to be specified with modifying @ record.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10742

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 4b4e30b780345c74f9983ba77f04c616b3d034b7)

source4/rpc_server/dnsserver/dcerpc_dnsserver.c

index 5733a51177ae3a824272198880ce6abaa1285ba2..d54940a1befe1a86cd7cec5e721a03aaae60baf6 100644 (file)
@@ -1853,7 +1853,9 @@ static WERROR dnsserver_update_record(struct dnsserver_state *dsstate,
        W_ERROR_HAVE_NO_MEMORY(tmp_ctx);
 
        /* If node_name is @ or zone name, dns record is @ */
-       if (strcmp(node_name, "@") == 0 || strcasecmp(node_name, z->name) == 0) {
+       if (strcmp(node_name, "@") == 0 ||
+           strcmp(node_name, ".") == 0 ||
+           strcasecmp(node_name, z->name) == 0) {
                name = talloc_strdup(tmp_ctx, "@");
        } else {
                name = dns_split_node_name(tmp_ctx, node_name, z->name);