From c54dfcade91115fae4566ca5d9a06cf804257622 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Tue, 23 Jan 2018 14:20:17 +0000 Subject: [PATCH] - Fix that unbound-checkconf -f flag works with auto-trust-anchor-file for startup scripts to get the full pathname(s) of anchor file(s). git-svn-id: file:///svn/unbound/trunk@4447 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 4 ++++ smallapp/unbound-checkconf.c | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/doc/Changelog b/doc/Changelog index e02ac95a5..9c3724007 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +23 January 2018: Wouter + - Fix that unbound-checkconf -f flag works with auto-trust-anchor-file + for startup scripts to get the full pathname(s) of anchor file(s). + 22 January 2018: Wouter - Accept tls-upstream in unbound.conf, the ssl-upstream keyword is also recognized and means the same. Also for tls-port, diff --git a/smallapp/unbound-checkconf.c b/smallapp/unbound-checkconf.c index 2b84aad12..86f0e6a59 100644 --- a/smallapp/unbound-checkconf.c +++ b/smallapp/unbound-checkconf.c @@ -109,6 +109,16 @@ print_option(struct config_file* cfg, const char* opt, int final) free(p); return; } + if(strcmp(opt, "auto-trust-anchor-file") == 0 && final) { + struct config_strlist* s = cfg->auto_trust_anchor_file_list; + for(; s; s=s->next) { + char *p = fname_after_chroot(s->str, cfg, 1); + if(!p) fatal_exit("out of memory"); + printf("%s\n", p); + free(p); + } + return; + } if(!config_get_option(cfg, opt, config_print_func, stdout)) fatal_exit("cannot print option '%s'", opt); }