Skip to content

Commit

Permalink
s4-rpc: dnsserver: return DNS_RANK_NS_GLUE recors when explicitly ask…
Browse files Browse the repository at this point in the history
…ed for

NS records should be included in the query for sub-domains.  NS records
got dropped when the rank for NS records was correctly set to NS_GLUE
from ZONE in commit 2036cbd.

  samba-tool dns query 172.31.9.161 s4xdom.base @ ALL
  =>
  Name=glue, Records=0, Children=0

  samba-tool dns query 172.31.9.161 s4xdom.base glue ALL
  =>
    Name=, Records=1, Children=0
      NS: glue.dns.private. (flags=40000082, serial=21, ttl=900)

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

Signed-off-by: Stefan Metzmacher <[email protected]>
Reviewed-by: Amitay Isaacs <[email protected]>

Autobuild-User(master): Amitay Isaacs <[email protected]>
Autobuild-Date(master): Thu Sep  4 14:37:51 CEST 2014 on sn-devel-104
metze-samba authored and Amitay Isaacs committed Sep 4, 2014
1 parent 2c342e4 commit 0b4a3b7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source4/rpc_server/dnsserver/dnsdata.c
Original file line number Diff line number Diff line change
@@ -798,6 +798,15 @@ WERROR dns_fill_records_array(TALLOC_CTX *mem_ctx,
if (select_flag & DNS_RPC_VIEW_AUTHORITY_DATA) {
if (dnsp_rec.rank == DNS_RANK_ZONE) {
found = true;
} else if (dnsp_rec.rank == DNS_RANK_NS_GLUE) {
/*
* If branch_name is NULL, we're
* explicitly asked to also return
* DNS_RANK_NS_GLUE records
*/
if (branch_name == NULL) {
found = true;
}
}
}
if (select_flag & DNS_RPC_VIEW_CACHE_DATA) {

0 comments on commit 0b4a3b7

Please sign in to comment.