summaryrefslogtreecommitdiffstats
path: root/dirmngr
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-04-27 11:57:08 +0200
committerWerner Koch <wk@gnupg.org>2018-04-27 11:57:08 +0200
commitd22506a343cec61b7d1a48c970b63a8458b267ab (patch)
tree349bcfba06d424cb0bee8d751a95c4667430deb2 /dirmngr
parentdirmngr: Lower the dead host resurrection time to 1.5h (diff)
downloadgnupg2-d22506a343cec61b7d1a48c970b63a8458b267ab.tar.xz
gnupg2-d22506a343cec61b7d1a48c970b63a8458b267ab.zip
dirmngr: Silence log output from dirmngr_ldap.
* dirmngr/dirmngr_ldap.c: Remove assert.h. (main): Replace assert by log_assert. * dirmngr/ldap.c (run_ldap_wrapper): Use debug options to pass verbose options to dirmngr_ldap. (start_cert_fetch_ldap): Ditto. -- verbose is a pretty common option in dirmngr.conf and it would clutter the logs with output from dirmngr_ldap. Now we require DBG_EXTPROG or DBG_LOOKUP to make dirmngr_ldap more verbose. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'dirmngr')
-rw-r--r--dirmngr/dirmngr.c3
-rw-r--r--dirmngr/dirmngr_ldap.c3
-rw-r--r--dirmngr/ldap.c12
3 files changed, 13 insertions, 5 deletions
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index 17adae2f4..31f8e0f46 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -2235,7 +2235,8 @@ handle_connections (assuan_fd_t listen_fd)
npth_timersub (&abstime, &curtime, &timeout);
#ifndef HAVE_W32_SYSTEM
- ret = npth_pselect (nfd+1, &read_fdset, NULL, NULL, &timeout, npth_sigev_sigmask());
+ ret = npth_pselect (nfd+1, &read_fdset, NULL, NULL, &timeout,
+ npth_sigev_sigmask());
saved_errno = errno;
while (npth_sigev_get_pending(&signo))
diff --git a/dirmngr/dirmngr_ldap.c b/dirmngr/dirmngr_ldap.c
index 5be4e5814..e05c77925 100644
--- a/dirmngr/dirmngr_ldap.c
+++ b/dirmngr/dirmngr_ldap.c
@@ -29,7 +29,6 @@
# include <signal.h>
#endif
#include <errno.h>
-#include <assert.h>
#include <sys/time.h>
#include <unistd.h>
#ifndef USE_LDAPWRAPPER
@@ -343,7 +342,7 @@ ldap_wrapper_main (char **argv, estream_t outstream)
usage (1);
#else
/* All passed arguments should be fine in this case. */
- assert (argc);
+ log_assert (argc);
#endif
#ifdef USE_LDAPWRAPPER
diff --git a/dirmngr/ldap.c b/dirmngr/ldap.c
index adf83071e..cb3c0b763 100644
--- a/dirmngr/ldap.c
+++ b/dirmngr/ldap.c
@@ -136,8 +136,12 @@ run_ldap_wrapper (ctrl_t ctrl,
argv[argc++] = "--pass";
argv[argc++] = pass;
}
- if (opt.verbose)
+
+ if (DBG_LOOKUP)
argv[argc++] = "-vv";
+ else if (DBG_EXTPROG)
+ argv[argc++] = "-v";
+
argv[argc++] = "--log-with-pid";
if (multi_mode)
argv[argc++] = "--multi";
@@ -564,8 +568,12 @@ start_cert_fetch_ldap (ctrl_t ctrl, cert_fetch_context_t *context,
argv[argc++] = "--pass";
argv[argc++] = pass;
}
- if (opt.verbose)
+
+ if (DBG_LOOKUP)
argv[argc++] = "-vv";
+ else if (DBG_EXTPROG)
+ argv[argc++] = "-v";
+
argv[argc++] = "--log-with-pid";
argv[argc++] = "--multi";
if (opt.ldaptimeout)