]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: lmdb: fix records removal in deleteDomain() 11115/head
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 20 Dec 2021 15:57:40 +0000 (16:57 +0100)
committermind04 <mind04@monshouwer.org>
Mon, 20 Dec 2021 16:01:59 +0000 (17:01 +0100)
modules/lmdbbackend/lmdbbackend.cc

index 7c33213610f995fc8cb74d4c38c7d476c03c0047..f8ef095165eeddb38e2322be22c6a3d8fd05756f 100644 (file)
@@ -648,16 +648,7 @@ bool LMDBBackend::deleteDomain(const DNSName& domain)
   }
 
   doms.del(id);
-  compoundOrdername co;
-  string match = co(id);
-
-  auto cursor = txn->txn->getCursor(txn->db->dbi);
-  MDBOutVal key, val;
-  if (!cursor.find(match, key, val)) {
-    do {
-      cursor.del();
-    } while (!cursor.next(key, val) && key.get<StringView>().rfind(match, 0) == 0);
-  }
+  deleteDomainRecords(*txn, id);
 
   if (needCommit)
     txn->txn->commit();