From: Wouter Wijngaards Date: Tue, 7 Apr 2015 13:50:09 +0000 (+0000) Subject: - unbound-control list_insecure command shows the negative trust X-Git-Tag: release-1.5.4~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53008d796990d8b2cbd6e477c8040cc0f9e30890;p=thirdparty%2Funbound.git - unbound-control list_insecure command shows the negative trust anchors currently configured, patch from Jelte Jansen. git-svn-id: file:///svn/unbound/trunk@3389 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/daemon/remote.c b/daemon/remote.c index 24008bf17..7b09c03a0 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -1892,6 +1892,21 @@ do_insecure_remove(SSL* ssl, struct worker* worker, char* arg) send_ok(ssl); } +static void +do_insecure_list(SSL* ssl, struct worker* worker) +{ + char buf[257]; + struct trust_anchor* a; + if(worker->env.anchors) { + RBTREE_FOR(a, struct trust_anchor*, worker->env.anchors->tree) { + if(a->numDS == 0 && a->numDNSKEY == 0) { + dname_str(a->name, buf); + ssl_printf(ssl, "%s\n", buf); + } + } + } +} + /** do the status command */ static void do_status(SSL* ssl, struct worker* worker) @@ -2312,6 +2327,9 @@ execute_cmd(struct daemon_remote* rc, SSL* ssl, char* cmd, } else if(cmdcmp(p, "list_stubs", 10)) { do_list_stubs(ssl, worker); return; + } else if(cmdcmp(p, "list_insecure", 13)) { + do_insecure_list(ssl, worker); + return; } else if(cmdcmp(p, "list_local_zones", 16)) { do_list_local_zones(ssl, worker); return; diff --git a/doc/Changelog b/doc/Changelog index 9c99baaa1..20dc5ad1c 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -6,6 +6,8 @@ The file has to be writable to notice the trust anchor change, without it, a trust anchor change will be unnoticed and the system will then become inoperable. + - unbound-control list_insecure command shows the negative trust + anchors currently configured, patch from Jelte Jansen. 2 April 2015: Wouter - Fix #660: Fix interface-automatic broken in the presence of diff --git a/doc/unbound-control.8.in b/doc/unbound-control.8.in index 259eee1d0..6a2c177e4 100644 --- a/doc/unbound-control.8.in +++ b/doc/unbound-control.8.in @@ -197,6 +197,9 @@ This includes the root hints in use. .B list_forwards List the forward zones in use. These are printed zone by zone to the output. .TP +.B list_insecure +List the zones with domain\-insecure. +.TP .B list_local_zones List the local zones in use. These are printed one per line with zone type. .TP diff --git a/smallapp/unbound-control.c b/smallapp/unbound-control.c index 3b47d3bf8..29530d4f6 100644 --- a/smallapp/unbound-control.c +++ b/smallapp/unbound-control.c @@ -109,6 +109,7 @@ usage() printf(" get_option opt get option value\n"); printf(" list_stubs list stub-zones and root hints in use\n"); printf(" list_forwards list forward-zones in use\n"); + printf(" list_insecure list domain-insecure zones\n"); printf(" list_local_zones list local-zones in use\n"); printf(" list_local_data list local-data RRs in use\n"); printf(" insecure_add zone add domain-insecure zone\n");