From ffdd9ddeaeada92fec3baf2046a4e03810f26286 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Sat, 13 May 2023 19:29:48 +1200 Subject: [PATCH] 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 --- source4/dns_server/dnsserver_common.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.47.3