]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
If the update policy Lua file cannot be read, don't fall back to allow-all policy.
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 5 Jan 2022 11:49:45 +0000 (12:49 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 2 Sep 2022 12:22:48 +0000 (14:22 +0200)
pdns/packethandler.cc

index cc9328824d369f6014f2e24189ddc659df0c8f9b..d74efbd1dd43b34490f6e99b368cd071886b01b5 100644 (file)
@@ -88,7 +88,9 @@ PacketHandler::PacketHandler():B(s_programname), d_dk(&B)
   else
   {
     d_update_policy_lua = std::make_unique<AuthLua4>();
-    d_update_policy_lua->loadFile(fname);
+    if (d_update_policy_lua->loadFile(fname) != 0) {
+      d_update_policy_lua = nullptr;
+    }
   }
 }