From: Douglas Bagnall Date: Sat, 13 May 2023 07:29:48 +0000 (+1200) Subject: s4:dns_server: loudly warn when a tombstone record has other records X-Git-Tag: talloc-2.4.2~1021 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ffdd9ddeaeada92fec3baf2046a4e03810f26286;p=thirdparty%2Fsamba.git s4:dns_server: loudly warn when a tombstone record has other records This shouldn't happen -- that is, there should never be non-tombstone records in conjunction with a tombstone record -- and if it does, the situation should resolve itself here. But the flow is confusing and strange things sometimes happen often enough that it would be helpful to know if this ever occurs. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/source4/dns_server/dnsserver_common.c b/source4/dns_server/dnsserver_common.c index ad91f96340a..fbe39d99bf0 100644 --- a/source4/dns_server/dnsserver_common.c +++ b/source4/dns_server/dnsserver_common.c @@ -1034,6 +1034,11 @@ WERROR dns_common_replace(struct ldb_context *samdb, * record. */ if (records[i].data.EntombedTime != 0) { + if (rec_count != 1) { + DBG_ERR("tombstone record has %u neighbour " + "records.\n", + rec_count - 1); + } was_tombstoned = true; } continue;