]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: declare enable-lua-record-updates unconditionally
authorManuel Mausz <manuel@mausz.at>
Tue, 9 Jun 2026 12:40:41 +0000 (14:40 +0200)
committerManuel Mausz <manuel@mausz.at>
Tue, 9 Jun 2026 12:45:00 +0000 (14:45 +0200)
The Lua record update restrictions added in #17131 rely on the
enable-lua-record-updates setting. When built without Lua record support,
this setting is not defined, causing errors like:

Undefined but needed argument: 'enable-lua-record-updates'

Add the setting unconditionally.

Signed-off-by: Manuel Mausz <manuel@mausz.at>
pdns/auth-main.cc

index aa0d18e9367fca98aca243551fa66e48f709b654..f0601d91e6f6e3365247fe853586942413123dee 100644 (file)
@@ -324,7 +324,6 @@ static void declareArguments()
   ::arg().setSwitch("8bit-dns", "Allow 8bit dns queries") = "no";
 #ifdef HAVE_LUA_RECORDS
   ::arg().setSwitch("enable-lua-records", "Process Lua records for all zones (metadata overrides this)") = "no";
-  ::arg().setSwitch("enable-lua-record-updates", "Allow updates to Lua records") = "no";
   ::arg().setSwitch("lua-records-insert-whitespace", "Insert whitespace when combining Lua chunks") = "no";
   ::arg().set("lua-records-exec-limit", "Lua records scripts execution limit (instructions count). Values <= 0 mean no limit") = "1000";
   ::arg().set("lua-health-checks-expire-delay", "Stops doing health checks after the record hasn't been used for that delay (in seconds)") = "3600";
@@ -359,6 +358,9 @@ static void declareArguments()
 
   ::arg().setSwitch("views", "Enable views (variants) of zones, for backends which support them") = "no";
 
+  // Needed by Lua backend
+  ::arg().setSwitch("enable-lua-record-updates", "Allow updates to Lua records") = "no";
+
   // FIXME520: remove when branching 5.2
   ::arg().set("entropy-source", "") = "";
   ::arg().set("rng", "") = "";