upstream commit

When tearing down ControlMaster connecctions, don't
pollute stderr when LogLevel=quiet.  Patch from Tim Kuijsten via tech@.

Upstream-ID: d9b3a68b2a7c2f2fc7f74678e29a4618d55ceced
This commit is contained in:
dtucker@openbsd.org 2016-10-19 23:21:56 +00:00 committed by Darren Tucker
parent 09e6a7d835
commit 0b9ee623d5

8
mux.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: mux.c,v 1.62 2016/09/30 09:19:13 markus Exp $ */
/* $OpenBSD: mux.c,v 1.63 2016/10/19 23:21:56 dtucker Exp $ */
/*
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
*
@ -2234,7 +2234,8 @@ muxclient(const char *path)
exit(0);
case SSHMUX_COMMAND_TERMINATE:
mux_client_request_terminate(sock);
fprintf(stderr, "Exit request sent.\r\n");
if (options.log_level != SYSLOG_LEVEL_QUIET)
fprintf(stderr, "Exit request sent.\r\n");
exit(0);
case SSHMUX_COMMAND_FORWARD:
if (mux_client_forwards(sock, 0) != 0)
@ -2252,7 +2253,8 @@ muxclient(const char *path)
exit(0);
case SSHMUX_COMMAND_STOP:
mux_client_request_stop_listening(sock);
fprintf(stderr, "Stop listening request sent.\r\n");
if (options.log_level != SYSLOG_LEVEL_QUIET)
fprintf(stderr, "Stop listening request sent.\r\n");
exit(0);
case SSHMUX_COMMAND_CANCEL_FWD:
if (mux_client_forwards(sock, 1) != 0)