From: Petr Špaček Date: Fri, 22 Mar 2019 13:45:56 +0000 (+0100) Subject: trust_anchors: do not accept add_file() for managed TA without ta_update module X-Git-Tag: v4.0.0~15^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff41bca5404e6a827901e2aaeea857fc110446c0;p=thirdparty%2Fknot-resolver.git trust_anchors: do not accept add_file() for managed TA without ta_update module Previous version would add the TA and then print error message, which is not expected. --- diff --git a/daemon/lua/trust_anchors.lua.in b/daemon/lua/trust_anchors.lua.in index cc1e8b3c9..d17b20df7 100644 --- a/daemon/lua/trust_anchors.lua.in +++ b/daemon/lua/trust_anchors.lua.in @@ -318,6 +318,10 @@ end local function add_file(path, unmanaged) local managed = not unmanaged if managed then + if not ta_update then + panic('[ ta ] automatic update for TA ' .. owner_str .. ' requested, ' + .. 'but required module ta_update is not loaded') + end if not io.open(path .. '.lock', 'w') then error("[ ta ] ERROR: write access needed to keyfile dir '"..path.."'") end @@ -370,10 +374,6 @@ local function add_file(path, unmanaged) -- TODO: if failed and for root, try to rebootstrap? if managed then - if not ta_update then - panic('[ ta ] automatic update for TA ' .. owner_str .. ' requested, ' - .. 'but required plugin ta_update is not loaded') - end ta_update.start(owner) end end diff --git a/tests/integration/deckard b/tests/integration/deckard index f601f2f75..839af3909 160000 --- a/tests/integration/deckard +++ b/tests/integration/deckard @@ -1 +1 @@ -Subproject commit f601f2f7557344a6c8bc436a01f325213d1f23dd +Subproject commit 839af3909d5af7835822f72dd2e3238fb6229edb