Disable logging to syslog for libunbound. We are not getting anything
authorflorian <florian@openbsd.org>
Mon, 25 Jan 2021 16:56:59 +0000 (16:56 +0000)
committerflorian <florian@openbsd.org>
Mon, 25 Jan 2021 16:56:59 +0000 (16:56 +0000)
useful for us out of it and it can be quite noisy when we are missing
IPv4 or IPv6 addresses.
It is still available when logging to stderr when running with -d.
OK phessler

sbin/unwind/resolver.c
sbin/unwind/unwind.8

index e800d38..af18795 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: resolver.c,v 1.134 2021/01/24 18:29:15 florian Exp $  */
+/*     $OpenBSD: resolver.c,v 1.135 2021/01/25 16:56:59 florian Exp $  */
 
 /*
  * Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -498,7 +498,7 @@ resolver_dispatch_frontend(int fd, short event, void *bula)
                                    "%lu", __func__,
                                    IMSG_DATA_SIZE(imsg));
                        memcpy(&verbose, imsg.data, sizeof(verbose));
-                       if ((log_getverbose() & OPT_VERBOSE3)
+                       if (log_getdebug() && (log_getverbose() & OPT_VERBOSE3)
                            != (verbose & OPT_VERBOSE3))
                                restart_ub_resolvers();
                        log_setverbose(verbose);
@@ -1257,13 +1257,14 @@ create_resolver(enum uw_resolver_type type)
 
                if (!log_getdebug()) {
                        if((err = ub_ctx_set_option(res->ctx, "use-syslog:",
-                           "yes")) != 0) {
+                           "no")) != 0) {
                                ub_ctx_delete(res->ctx);
                                free(res);
-                               log_warnx("error setting use-syslog: yes: %s",
+                               log_warnx("error setting use-syslog: no: %s",
                                    ub_strerror(err));
                                return (NULL);
                        }
+                       ub_ctx_debugout(res->ctx, NULL);
                }
 
                break;
index f1c8c5c..bb9812e 100644 (file)
@@ -1,4 +1,4 @@
-.\"    $OpenBSD: unwind.8,v 1.9 2020/10/29 17:28:12 solene Exp $
+.\"    $OpenBSD: unwind.8,v 1.10 2021/01/25 16:57:00 florian Exp $
 .\"
 .\" Copyright (c) 2018 Florian Obser <florian@openbsd.org>
 .\" Copyright (c) 2016 Kenneth R Westerback <kwesterback@gmail.com>
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd $Mdocdate: October 29 2020 $
+.Dd $Mdocdate: January 25 2021 $
 .Dt UNWIND 8
 .Os
 .Sh NAME
@@ -92,6 +92,8 @@ Produce more verbose output.
 Multiple
 .Fl v
 options increase the verbosity.
+Debug output from libunbound is only available when logging to
+.Em stderr .
 .El
 .Sh FILES
 .Bl -tag -width "/var/db/unwind.keyXXX" -compact