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/c63f2ed92c97
branches:  trunk
changeset: 930855:c63f2ed92c97
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 0d37c2ad4f3e -r c63f2ed92c97 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