From: djm Date: Tue, 11 Jan 2022 01:26:47 +0000 (+0000) Subject: suppress "Connection to xxx closed" messages at LogLevel >= error X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f3a04d5ee542a85a83a69e312488bf00ed15bf18;p=openbsd suppress "Connection to xxx closed" messages at LogLevel >= error bz3378; ok dtucker@ --- diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c index 88c0ee9020a..4a828a4a2e9 100644 --- a/usr.bin/ssh/clientloop.c +++ b/usr.bin/ssh/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.375 2022/01/06 21:57:28 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.376 2022/01/11 01:26:47 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1422,7 +1422,7 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg, * In interactive mode (with pseudo tty) display a message indicating * that the connection has been closed. */ - if (have_pty && options.log_level != SYSLOG_LEVEL_QUIET) { + if (have_pty && options.log_level >= SYSLOG_LEVEL_INFO) { if ((r = sshbuf_putf(stderr_buffer, "Connection to %.64s closed.\r\n", host)) != 0) fatal_fr(r, "sshbuf_putf"); diff --git a/usr.bin/ssh/mux.c b/usr.bin/ssh/mux.c index e39a134ff12..5a49f16afe9 100644 --- a/usr.bin/ssh/mux.c +++ b/usr.bin/ssh/mux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.91 2021/07/23 04:00:59 djm Exp $ */ +/* $OpenBSD: mux.c,v 1.92 2022/01/11 01:26:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller * @@ -2017,7 +2017,7 @@ mux_client_request_session(int fd) } else debug2("Received exit status from master %d", exitval); - if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) + if (tty_flag && options.log_level >= SYSLOG_LEVEL_INFO) fprintf(stderr, "Shared connection to %s closed.\r\n", host); exit(exitval);