From: Otto Moerbeek Date: Wed, 5 Jan 2022 11:49:45 +0000 (+0100) Subject: If the update policy Lua file cannot be read, don't fall back to allow-all policy. X-Git-Tag: auth-4.7.0-beta2~10^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6521680a4ebb297c2047d77e1dd0d1c068d40a64;p=thirdparty%2Fpdns.git If the update policy Lua file cannot be read, don't fall back to allow-all policy. (cherry picked from commit b6f77d0372c189c78b578a2b1f0dfe83334401d3) --- diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index cc9328824d..d74efbd1dd 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -88,7 +88,9 @@ PacketHandler::PacketHandler():B(s_programname), d_dk(&B) else { d_update_policy_lua = std::make_unique(); - d_update_policy_lua->loadFile(fname); + if (d_update_policy_lua->loadFile(fname) != 0) { + d_update_policy_lua = nullptr; + } } }