]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:dns_server: loudly warn when a tombstone record has other records
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sat, 13 May 2023 07:29:48 +0000 (19:29 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 26 Oct 2023 01:24:32 +0000 (01:24 +0000)
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 <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dns_server/dnsserver_common.c

index ad91f96340adc5427dccd3243e744f4a4ed3b3e0..fbe39d99bf01b94addacab6a3ef095989757cee9 100644 (file)
@@ -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;