]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix that unbound-checkconf -f flag works with auto-trust-anchor-file
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 23 Jan 2018 14:20:17 +0000 (14:20 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 23 Jan 2018 14:20:17 +0000 (14:20 +0000)
  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
smallapp/unbound-checkconf.c

index e02ac95a5cf9e05862314d579f7ff02c5af6674e..9c3724007e6f8b816e97eee59fe9620317b1c5c0 100644 (file)
@@ -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,
index 2b84aad12aba34837d6fa6da9792587506f1709a..86f0e6a59d161c36d49527ed63ccfc0e65756bb7 100644 (file)
@@ -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);
 }