From 34456fab62fedc6a938d189c7485f40899b3fbb6 Mon Sep 17 00:00:00 2001 From: Michael Saxl Date: Tue, 19 Mar 2019 13:26:32 +0100 Subject: [PATCH] s4:dns_server: bind_dlz make b9_has_soa check dc=@ node the zone node does not hold the dnsRecord values, so for the zone level the node dc=@,dc=zonename has to be queried regression introduced with 28e2a518ff32, BUG: https://bugzilla.samba.org/show_bug.cgi?id=13466 BUG: https://bugzilla.samba.org/show_bug.cgi?id=13841 --- source4/dns_server/dlz_bind9.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source4/dns_server/dlz_bind9.c b/source4/dns_server/dlz_bind9.c index 82c72111a00..b46dec6cb35 100644 --- a/source4/dns_server/dlz_bind9.c +++ b/source4/dns_server/dlz_bind9.c @@ -1276,6 +1276,17 @@ static bool b9_has_soa(struct dlz_bind9_data *state, struct ldb_dn *dn, const ch return false; } + /* + * The SOA record is alwas stored under DC=@,DC=zonename + * This can probably be removed when dns_common_lookup makes a fallback + * lookup on @ pseudo record + */ + + if (!ldb_dn_add_child_fmt(dn,"DC=@")) { + talloc_free(tmp_ctx); + return false; + } + werr = dns_common_lookup(state->samdb, tmp_ctx, dn, &records, &num_records, NULL); if (!W_ERROR_IS_OK(werr)) { -- 2.19.1