From: Michael Saxl Date: Thu, 21 Mar 2019 17:22:38 +0000 (+0100) Subject: s4:dlz make b9_has_soa check dc=@ node X-Git-Tag: samba-4.10.1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e94b0a3144385e551d25ecb55cda2cb51fe398f;p=thirdparty%2Fsamba.git s4: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 Signed-off-by: Michael Saxl Reviewed-by: Garming Sam Reviewed-by: Andrew Bartlett (cherry picked from commit 526c6d0be53d97beb38f82a3619d8710fefb4091) --- diff --git a/selftest/knownfail.d/bind9-dlz b/selftest/knownfail.d/bind9-dlz deleted file mode 100644 index 84fc82f1f8b..00000000000 --- a/selftest/knownfail.d/bind9-dlz +++ /dev/null @@ -1,2 +0,0 @@ -^samba4.dlz_bind9.configure.configure.* -^samba4.dlz_bind9.multipleconfigure.multipleconfigure.* 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)) {