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)
committerStefan Metzmacher <metze@samba.org>
Tue, 29 Jul 2014 15:11:08 +0000 (17:11 +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>
source4/rpc_server/dnsserver/dcerpc_dnsserver.c

index f3dd1957afb52010684830785e16822726344714..856016c5345243191a289ae7e5aa00a5c34d4cf6 100644 (file)
@@ -1859,7 +1859,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);