Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/dhcpcd/dist/src privsep: Redirect to /dev/null ...



details:   https://anonhg.NetBSD.org/src/rev/6b001488279e
branches:  trunk
changeset: 1009184:6b001488279e
user:      roy <roy%NetBSD.org@localhost>
date:      Wed Apr 15 15:55:24 2020 +0000

description:
privsep: Redirect to /dev/null unless test or quiet and not debug

Keeps the rtsol like behaviour the same.

Fixes PR bin/55170

diffstat:

 external/bsd/dhcpcd/dist/src/privsep.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 6b177196b29d -r 6b001488279e external/bsd/dhcpcd/dist/src/privsep.c
--- a/external/bsd/dhcpcd/dist/src/privsep.c    Wed Apr 15 15:54:18 2020 +0000
+++ b/external/bsd/dhcpcd/dist/src/privsep.c    Wed Apr 15 15:55:24 2020 +0000
@@ -243,7 +243,9 @@
        if (callback(recv_ctx) == -1)
                goto errexit;
 
-       if (!(ctx->options & (DHCPCD_TEST | DHCPCD_DEBUG))) {
+       if (!(ctx->options & DHCPCD_DEBUG) &&
+          (!(ctx->options & DHCPCD_TEST) || loggetopts() & LOGERR_QUIET))
+       {
                freopen(_PATH_DEVNULL, "w", stdout);
                freopen(_PATH_DEVNULL, "w", stderr);
        }



Home | Main Index | Thread Index | Old Index