[Pkg-gnupg-commit] [gnupg2] 229/241: dirmngr: Add command to print the resolver version.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Dec 9 20:32:22 UTC 2015
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 4ff2cae7dee36ffee854c5f05c3e8ee9eb0308dd
Author: Werner Koch <wk at gnupg.org>
Date: Thu Dec 3 18:05:32 2015 +0100
dirmngr: Add command to print the resolver version.
* dirmngr/server.c (cmd_getinfo): Add sub-command "dnsinfo".
---
dirmngr/server.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dirmngr/server.c b/dirmngr/server.c
index 21cb2dc..0794509 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -2190,6 +2190,7 @@ static const char hlp_getinfo[] =
"version - Return the version of the program.\n"
"pid - Return the process id of the server.\n"
"tor - Return OK if running in Tor mode\n"
+ "dnsinfo - Return info about the DNS resolver\n"
"socket_name - Return the name of the socket.\n";
static gpg_error_t
cmd_getinfo (assuan_context_t ctx, char *line)
@@ -2235,6 +2236,17 @@ cmd_getinfo (assuan_context_t ctx, char *line)
else
err = set_error (GPG_ERR_FALSE, "Tor mode is NOT enabled");
}
+ else if (!strcmp (line, "dnsinfo"))
+ {
+#if USE_ADNS && HAVE_ADNS_IF_TORMODE
+ assuan_set_okay_line (ctx, "- ADNS with Tor support");
+#elif USE_ADNS
+ assuan_set_okay_line (ctx, "- ADNS w/o Tor support");
+#else
+ assuan_set_okay_line (ctx, "- System resolver w/o Tor support");
+#endif
+ err = 0;
+ }
else
err = set_error (GPG_ERR_ASS_PARAMETER, "unknown value for WHAT");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list