summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2007-06-13 00:18:25 +0000
committerColin Watson <cjwatson@debian.org>2007-06-13 00:18:25 +0000
commit58c1210f4b0d85eec0f7df539643ac3c705862fc (patch)
tree7aee5204e60fde616ab7b5a9f06e6af168a701ec
parenta31dd2449bd885d5763c2857eb4cac2794cf7ba9 (diff)
* Suppress "Connection to <host> closed" and "Connection to master closed"
messages at loglevel SILENT (thanks, Jaap Eldering; closes: #409788). * Suppress "Pseudo-terminal will not be allocated because stdin is not a terminal" message at loglevels QUIET and SILENT (closes: #366814).
-rw-r--r--clientloop.c2
-rw-r--r--debian/changelog4
-rw-r--r--ssh.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/clientloop.c b/clientloop.c
index ae93dcdf3..766a4b3bf 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1563,7 +1563,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1563 * In interactive mode (with pseudo tty) display a message indicating 1563 * In interactive mode (with pseudo tty) display a message indicating
1564 * that the connection has been closed. 1564 * that the connection has been closed.
1565 */ 1565 */
1566 if (have_pty && options.log_level != SYSLOG_LEVEL_QUIET) { 1566 if (have_pty && options.log_level > SYSLOG_LEVEL_QUIET) {
1567 snprintf(buf, sizeof buf, "Connection to %.64s closed.\r\n", host); 1567 snprintf(buf, sizeof buf, "Connection to %.64s closed.\r\n", host);
1568 buffer_append(&stderr_buffer, buf, strlen(buf)); 1568 buffer_append(&stderr_buffer, buf, strlen(buf));
1569 } 1569 }
diff --git a/debian/changelog b/debian/changelog
index 39ecb447c..3a1659e9f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ openssh (1:4.6p1-2) UNRELEASED; urgency=low
3 * Fix ordering of SYSLOG_LEVEL_QUIET and SYSLOG_LEVEL_FATAL. 3 * Fix ordering of SYSLOG_LEVEL_QUIET and SYSLOG_LEVEL_FATAL.
4 * Clarify that 'ssh -q -q' still prints errors caused by bad arguments 4 * Clarify that 'ssh -q -q' still prints errors caused by bad arguments
5 (i.e. before the logging system is initialised). 5 (i.e. before the logging system is initialised).
6 * Suppress "Connection to <host> closed" and "Connection to master closed"
7 messages at loglevel SILENT (thanks, Jaap Eldering; closes: #409788).
8 * Suppress "Pseudo-terminal will not be allocated because stdin is not a
9 terminal" message at loglevels QUIET and SILENT (closes: #366814).
6 10
7 -- Colin Watson <cjwatson@debian.org> Wed, 13 Jun 2007 00:56:45 +0100 11 -- Colin Watson <cjwatson@debian.org> Wed, 13 Jun 2007 00:56:45 +0100
8 12
diff --git a/ssh.c b/ssh.c
index c75decc1b..1d98a7034 100644
--- a/ssh.c
+++ b/ssh.c
@@ -602,7 +602,7 @@ main(int ac, char **av)
602 tty_flag = 0; 602 tty_flag = 0;
603 /* Do not allocate a tty if stdin is not a tty. */ 603 /* Do not allocate a tty if stdin is not a tty. */
604 if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { 604 if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) {
605 if (tty_flag) 605 if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET)
606 logit("Pseudo-terminal will not be allocated because stdin is not a terminal."); 606 logit("Pseudo-terminal will not be allocated because stdin is not a terminal.");
607 tty_flag = 0; 607 tty_flag = 0;
608 } 608 }
@@ -1485,7 +1485,7 @@ control_client(const char *path)
1485 1485
1486 leave_raw_mode(); 1486 leave_raw_mode();
1487 1487
1488 if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) 1488 if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET)
1489 fprintf(stderr, "Connection to master closed.\r\n"); 1489 fprintf(stderr, "Connection to master closed.\r\n");
1490 1490
1491 exit(exitval); 1491 exit(exitval);