From: Matthieu Patou Date: Tue, 2 Oct 2012 04:36:34 +0000 (-0700) Subject: s4-dns: Ignore zones that shouldn't be returned currently X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=ffab1d7cb28590f8e1ee9b90a8f7dbb84e7adb07;p=metze%2Fsamba%2Fwip.git s4-dns: Ignore zones that shouldn't be returned currently RootDNSServers should never be returned (Windows DNS server don't) ..TrustAnchors should never be returned as is, (Windows returns TrustAnchors) and for the moment we don't support DNSSEC so we'd better not return this zone. --- diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c index 003dd4ecde8c..e750e33e19ab 100644 --- a/source4/dns_server/dns_server.c +++ b/source4/dns_server/dns_server.c @@ -833,7 +833,13 @@ static void dns_task_init(struct task_server *task) z->name = ldb_msg_find_attr_as_string(res->msgs[i], "name", NULL); z->dn = talloc_move(z, &res->msgs[i]->dn); - + /* Ignore the RootDNSServers zone and zones that we don't support yet */ + if ((strcmp(z->name, "RootDNSServers") == 0) || + (strcmp(z->name, "..TrustAnchors") == 0)) { + DEBUG(10, ("Ignoring zone %s\n", z->name)); + talloc_free(z); + continue; + } DLIST_ADD_END(dns->zones, z, NULL); }