]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: lmdb does not support multiple instances 10013/head
authorKees Monshouwer <mind04@monshouwer.org>
Fri, 5 Feb 2021 20:29:48 +0000 (21:29 +0100)
committermind04 <mind04@monshouwer.org>
Fri, 5 Feb 2021 20:29:48 +0000 (21:29 +0100)
docs/backends/lmdb.rst
modules/lmdbbackend/lmdbbackend.cc

index 0c454b595f507ac1fbe57bf09a0e118bc81c94d7..31638221f42764b4fd07be9ccad9be01975117bc 100644 (file)
@@ -9,6 +9,7 @@ LMDB backend
 * DNSSEC: Yes
 * Disabled data: No
 * Comments: No
+* Multiple instances: No
 * Module name: lmdb
 * Launch name: ``lmdb``
 
index 95b3976aeed30d94f3545a133fbfa0cf4ae4cda0..48bb226e00856a6c6910ffc4e4884405196bb8ed 100644 (file)
@@ -58,6 +58,11 @@ static std::mutex s_lmdbStartupLock;
 
 LMDBBackend::LMDBBackend(const std::string& suffix)
 {
+  // overlapping domain ids in combination with relative names are a recipe for disater
+  if (!suffix.empty()) {
+    throw std::runtime_error("LMDB backend does not suport multiple instances");
+  }
+
   setArgPrefix("lmdb"+suffix);
   
   string syncMode = toLower(getArg("sync-mode"));