From: Pieter Lexis Date: Thu, 23 Feb 2017 10:08:16 +0000 (+0100) Subject: Throw an error when lua-conf-file can't be loaded X-Git-Tag: rec-4.0.7~2^2~13^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75a12a8f5e9e07ec57bb74ed874b23c6784b6643;p=pdns Throw an error when lua-conf-file can't be loaded This ensures we cannot start up if the file is unreadable. Closes #4939 (cherry picked from commit 0f5785a6c441b043564f3ba26a39145aee74b1c2) --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 4efc81e48..3d86a0770 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -2640,7 +2640,31 @@ int serviceMain(int argc, char*argv[]) exit(99); } - loadRecursorLuaConfig(::arg()["lua-config-file"], ::arg().mustDo("daemon")); + // keep this ABOVE loadRecursorLuaConfig! + if(::arg()["dnssec"]=="off") + g_dnssecmode=DNSSECMode::Off; + else if(::arg()["dnssec"]=="process-no-validate") + g_dnssecmode=DNSSECMode::ProcessNoValidate; + else if(::arg()["dnssec"]=="process") + g_dnssecmode=DNSSECMode::Process; + else if(::arg()["dnssec"]=="validate") + g_dnssecmode=DNSSECMode::ValidateAll; + else if(::arg()["dnssec"]=="log-fail") + g_dnssecmode=DNSSECMode::ValidateForLog; + else { + L<