diff options
-rw-r--r-- | clientloop.c | 2 | ||||
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/openssh-server.postinst | 12 | ||||
-rw-r--r-- | debian/patches/doc-connection-sharing.patch | 2 | ||||
-rw-r--r-- | debian/patches/openbsd-docs.patch | 6 | ||||
-rw-r--r-- | debian/patches/ssh-argv0.patch | 2 | ||||
-rw-r--r-- | debian/patches/syslog-level-silent.patch | 177 | ||||
-rw-r--r-- | debian/patches/user-group-modes.patch | 2 | ||||
-rw-r--r-- | log.c | 3 | ||||
-rw-r--r-- | log.h | 1 | ||||
-rw-r--r-- | mux.c | 2 | ||||
-rw-r--r-- | sftp-server.8 | 2 | ||||
-rw-r--r-- | ssh.1 | 5 | ||||
-rw-r--r-- | ssh.c | 9 | ||||
-rw-r--r-- | ssh_config.5 | 2 | ||||
-rw-r--r-- | sshd.8 | 5 | ||||
-rw-r--r-- | sshd.c | 7 | ||||
-rw-r--r-- | sshd_config.5 | 2 |
18 files changed, 45 insertions, 202 deletions
diff --git a/clientloop.c b/clientloop.c index a55fe9995..56f8dd2f8 100644 --- a/clientloop.c +++ b/clientloop.c | |||
@@ -1538,7 +1538,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id) | |||
1538 | * In interactive mode (with pseudo tty) display a message indicating | 1538 | * In interactive mode (with pseudo tty) display a message indicating |
1539 | * that the connection has been closed. | 1539 | * that the connection has been closed. |
1540 | */ | 1540 | */ |
1541 | if (have_pty && options.log_level > SYSLOG_LEVEL_QUIET) { | 1541 | if (have_pty && options.log_level != SYSLOG_LEVEL_QUIET) { |
1542 | snprintf(buf, sizeof buf, | 1542 | snprintf(buf, sizeof buf, |
1543 | "Connection to %.64s closed.\r\n", host); | 1543 | "Connection to %.64s closed.\r\n", host); |
1544 | buffer_append(&stderr_buffer, buf, strlen(buf)); | 1544 | buffer_append(&stderr_buffer, buf, strlen(buf)); |
diff --git a/debian/changelog b/debian/changelog index 603ca1a3e..b27270e0e 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -56,6 +56,12 @@ openssh (1:5.4p1-1) UNRELEASED; urgency=low | |||
56 | name. (We'd still lose if the status nybble were ever changed, but that | 56 | name. (We'd still lose if the status nybble were ever changed, but that |
57 | would mean somebody had packaged a development/beta version rather than | 57 | would mean somebody had packaged a development/beta version rather than |
58 | a proper release, which doesn't appear to be normal practice.) | 58 | a proper release, which doesn't appear to be normal practice.) |
59 | * Drop most of our "LogLevel SILENT" (-qq) patch. This was originally | ||
60 | introduced to match the behaviour of non-free SSH, in which -q does not | ||
61 | suppress fatal errors, but matching the behaviour of OpenSSH upstream is | ||
62 | much more important nowadays. We no longer document that -q does not | ||
63 | suppress fatal errors (closes: #280609). Migrate "LogLevel SILENT" to | ||
64 | "LogLevel QUIET" in sshd_config on upgrade. | ||
59 | 65 | ||
60 | -- Colin Watson <cjwatson@debian.org> Mon, 01 Mar 2010 12:24:41 +0000 | 66 | -- Colin Watson <cjwatson@debian.org> Mon, 01 Mar 2010 12:24:41 +0000 |
61 | 67 | ||
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index 557bf2b23..d415f3f0d 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -234,6 +234,13 @@ move_subsystem_sftp() { | |||
234 | } | 234 | } |
235 | 235 | ||
236 | 236 | ||
237 | fix_loglevel_silent() { | ||
238 | if [ "$(get_config_option LogLevel)" = SILENT ]; then | ||
239 | set_config_option LogLevel QUIET | ||
240 | fi | ||
241 | } | ||
242 | |||
243 | |||
237 | create_sshdconfig() { | 244 | create_sshdconfig() { |
238 | if [ -e /etc/ssh/sshd_config ] ; then | 245 | if [ -e /etc/ssh/sshd_config ] ; then |
239 | # Upgrade an existing sshd configuration. | 246 | # Upgrade an existing sshd configuration. |
@@ -284,6 +291,11 @@ create_sshdconfig() { | |||
284 | rename_config_option KeepAlive TCPKeepAlive | 291 | rename_config_option KeepAlive TCPKeepAlive |
285 | fi | 292 | fi |
286 | 293 | ||
294 | # 'LogLevel SILENT' is now equivalent to QUIET. | ||
295 | if dpkg --compare-versions "$oldversion" lt 1:5.4p1-1; then | ||
296 | fix_loglevel_silent | ||
297 | fi | ||
298 | |||
287 | return 0 | 299 | return 0 |
288 | fi | 300 | fi |
289 | 301 | ||
diff --git a/debian/patches/doc-connection-sharing.patch b/debian/patches/doc-connection-sharing.patch index 759f86b30..d08f3d01f 100644 --- a/debian/patches/doc-connection-sharing.patch +++ b/debian/patches/doc-connection-sharing.patch | |||
@@ -9,7 +9,7 @@ Index: b/ssh.1 | |||
9 | =================================================================== | 9 | =================================================================== |
10 | --- a/ssh.1 | 10 | --- a/ssh.1 |
11 | +++ b/ssh.1 | 11 | +++ b/ssh.1 |
12 | @@ -563,7 +563,10 @@ | 12 | @@ -558,7 +558,10 @@ |
13 | the listen port will be dynamically allocated on the server and reported | 13 | the listen port will be dynamically allocated on the server and reported |
14 | to the client at run time. | 14 | to the client at run time. |
15 | .It Fl S Ar ctl_path | 15 | .It Fl S Ar ctl_path |
diff --git a/debian/patches/openbsd-docs.patch b/debian/patches/openbsd-docs.patch index e98938c15..0898c6ed3 100644 --- a/debian/patches/openbsd-docs.patch +++ b/debian/patches/openbsd-docs.patch | |||
@@ -60,7 +60,7 @@ Index: b/ssh.1 | |||
60 | =================================================================== | 60 | =================================================================== |
61 | --- a/ssh.1 | 61 | --- a/ssh.1 |
62 | +++ b/ssh.1 | 62 | +++ b/ssh.1 |
63 | @@ -764,6 +764,10 @@ | 63 | @@ -759,6 +759,10 @@ |
64 | .Sx HISTORY | 64 | .Sx HISTORY |
65 | section of | 65 | section of |
66 | .Xr ssl 8 | 66 | .Xr ssl 8 |
@@ -84,7 +84,7 @@ Index: b/sshd.8 | |||
84 | It forks a new | 84 | It forks a new |
85 | daemon for each incoming connection. | 85 | daemon for each incoming connection. |
86 | The forked daemons handle | 86 | The forked daemons handle |
87 | @@ -838,7 +838,7 @@ | 87 | @@ -835,7 +835,7 @@ |
88 | .Xr ssh 1 ) . | 88 | .Xr ssh 1 ) . |
89 | It should only be writable by root. | 89 | It should only be writable by root. |
90 | .Pp | 90 | .Pp |
@@ -93,7 +93,7 @@ Index: b/sshd.8 | |||
93 | Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange". | 93 | Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange". |
94 | The file format is described in | 94 | The file format is described in |
95 | .Xr moduli 5 . | 95 | .Xr moduli 5 . |
96 | @@ -934,7 +934,6 @@ | 96 | @@ -931,7 +931,6 @@ |
97 | .Xr ssh-vulnkey 1 , | 97 | .Xr ssh-vulnkey 1 , |
98 | .Xr chroot 2 , | 98 | .Xr chroot 2 , |
99 | .Xr hosts_access 5 , | 99 | .Xr hosts_access 5 , |
diff --git a/debian/patches/ssh-argv0.patch b/debian/patches/ssh-argv0.patch index c0b747e84..7caeff704 100644 --- a/debian/patches/ssh-argv0.patch +++ b/debian/patches/ssh-argv0.patch | |||
@@ -11,7 +11,7 @@ Index: b/ssh.1 | |||
11 | =================================================================== | 11 | =================================================================== |
12 | --- a/ssh.1 | 12 | --- a/ssh.1 |
13 | +++ b/ssh.1 | 13 | +++ b/ssh.1 |
14 | @@ -1432,6 +1432,7 @@ | 14 | @@ -1427,6 +1427,7 @@ |
15 | .Xr sftp 1 , | 15 | .Xr sftp 1 , |
16 | .Xr ssh-add 1 , | 16 | .Xr ssh-add 1 , |
17 | .Xr ssh-agent 1 , | 17 | .Xr ssh-agent 1 , |
diff --git a/debian/patches/syslog-level-silent.patch b/debian/patches/syslog-level-silent.patch index 3ed46c8f8..2dc912b8e 100644 --- a/debian/patches/syslog-level-silent.patch +++ b/debian/patches/syslog-level-silent.patch | |||
@@ -1,32 +1,15 @@ | |||
1 | Description: Add "LogLevel SILENT" (-qq), suppressing even fatal errors | 1 | Description: "LogLevel SILENT" compatibility |
2 | It's not clear that this is as useful as originally intended, or | 2 | "LogLevel SILENT" (-qq) was introduced in Debian openssh 1:3.0.1p1-1 to |
3 | implemented correctly, and there's no bug trail to be found for the | 3 | match the behaviour of non-free SSH, in which -q does not suppress fatal |
4 | original feature (although it has been tweaked by bug reports since it was | 4 | errors. However, this was unintentionally broken in 1:4.6p1-2 and nobody |
5 | added in Debian openssh 1:3.0.1p1-1). Needs review. | 5 | complained, so we've dropped most of it. The parts that remain are basic |
6 | . | 6 | configuration file compatibility, and an adjustment to "Pseudo-terminal |
7 | Jonathan says that this patch was originally meant to match the behaviour | 7 | will not be allocated ..." which should be split out into a separate patch. |
8 | of non-free SSH, in which -q does not suppress fatal errors. Given that | ||
9 | this was unintentionally broken in 1:4.6p1-2 and nobody's complained, we | ||
10 | can probably drop most of this. The adjustment to "Pseudo-terminal will | ||
11 | not be allocated ..." should be split out into a separate patch. | ||
12 | Author: Jonathan David Amery <jdamery@ysolde.ucam.org> | 8 | Author: Jonathan David Amery <jdamery@ysolde.ucam.org> |
13 | Author: Matthew Vernon <matthew@debian.org> | 9 | Author: Matthew Vernon <matthew@debian.org> |
14 | Author: Colin Watson <cjwatson@debian.org> | 10 | Author: Colin Watson <cjwatson@debian.org> |
15 | Last-Update: 2010-02-27 | 11 | Last-Update: 2010-03-31 |
16 | 12 | ||
17 | Index: b/clientloop.c | ||
18 | =================================================================== | ||
19 | --- a/clientloop.c | ||
20 | +++ b/clientloop.c | ||
21 | @@ -1536,7 +1536,7 @@ | ||
22 | * In interactive mode (with pseudo tty) display a message indicating | ||
23 | * that the connection has been closed. | ||
24 | */ | ||
25 | - if (have_pty && options.log_level != SYSLOG_LEVEL_QUIET) { | ||
26 | + if (have_pty && options.log_level > SYSLOG_LEVEL_QUIET) { | ||
27 | snprintf(buf, sizeof buf, | ||
28 | "Connection to %.64s closed.\r\n", host); | ||
29 | buffer_append(&stderr_buffer, buf, strlen(buf)); | ||
30 | Index: b/log.c | 13 | Index: b/log.c |
31 | =================================================================== | 14 | =================================================================== |
32 | --- a/log.c | 15 | --- a/log.c |
@@ -35,158 +18,20 @@ Index: b/log.c | |||
35 | LogLevel val; | 18 | LogLevel val; |
36 | } log_levels[] = | 19 | } log_levels[] = |
37 | { | 20 | { |
38 | + { "SILENT", SYSLOG_LEVEL_SILENT }, | 21 | + { "SILENT", SYSLOG_LEVEL_QUIET }, /* compatibility */ |
39 | { "QUIET", SYSLOG_LEVEL_QUIET }, | 22 | { "QUIET", SYSLOG_LEVEL_QUIET }, |
40 | { "FATAL", SYSLOG_LEVEL_FATAL }, | 23 | { "FATAL", SYSLOG_LEVEL_FATAL }, |
41 | { "ERROR", SYSLOG_LEVEL_ERROR }, | 24 | { "ERROR", SYSLOG_LEVEL_ERROR }, |
42 | @@ -244,6 +245,7 @@ | ||
43 | argv0 = av0; | ||
44 | |||
45 | switch (level) { | ||
46 | + case SYSLOG_LEVEL_SILENT: | ||
47 | case SYSLOG_LEVEL_QUIET: | ||
48 | case SYSLOG_LEVEL_FATAL: | ||
49 | case SYSLOG_LEVEL_ERROR: | ||
50 | Index: b/log.h | ||
51 | =================================================================== | ||
52 | --- a/log.h | ||
53 | +++ b/log.h | ||
54 | @@ -35,6 +35,7 @@ | ||
55 | } SyslogFacility; | ||
56 | |||
57 | typedef enum { | ||
58 | + SYSLOG_LEVEL_SILENT, | ||
59 | SYSLOG_LEVEL_QUIET, | ||
60 | SYSLOG_LEVEL_FATAL, | ||
61 | SYSLOG_LEVEL_ERROR, | ||
62 | Index: b/mux.c | ||
63 | =================================================================== | ||
64 | --- a/mux.c | ||
65 | +++ b/mux.c | ||
66 | @@ -1553,7 +1553,7 @@ | ||
67 | } else | ||
68 | debug2("Received exit status from master %d", exitval); | ||
69 | |||
70 | - if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) | ||
71 | + if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET) | ||
72 | fprintf(stderr, "Shared connection to %s closed.\r\n", host); | ||
73 | |||
74 | exit(exitval); | ||
75 | Index: b/sftp-server.8 | ||
76 | =================================================================== | ||
77 | --- a/sftp-server.8 | ||
78 | +++ b/sftp-server.8 | ||
79 | @@ -74,7 +74,7 @@ | ||
80 | Specifies which messages will be logged by | ||
81 | .Nm . | ||
82 | The possible values are: | ||
83 | -QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. | ||
84 | +SILENT, QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. | ||
85 | INFO and VERBOSE log transactions that | ||
86 | .Nm | ||
87 | performs on behalf of the client. | ||
88 | Index: b/ssh.1 | ||
89 | =================================================================== | ||
90 | --- a/ssh.1 | ||
91 | +++ b/ssh.1 | ||
92 | @@ -504,6 +504,11 @@ | ||
93 | .It Fl q | ||
94 | Quiet mode. | ||
95 | Causes most warning and diagnostic messages to be suppressed. | ||
96 | +Only fatal errors are displayed. | ||
97 | +If a second | ||
98 | +.Fl q | ||
99 | +is given then even fatal errors are suppressed, except for those produced | ||
100 | +due solely to bad arguments. | ||
101 | .It Fl R Xo | ||
102 | .Sm off | ||
103 | .Oo Ar bind_address : Oc | ||
104 | Index: b/ssh.c | 25 | Index: b/ssh.c |
105 | =================================================================== | 26 | =================================================================== |
106 | --- a/ssh.c | 27 | --- a/ssh.c |
107 | +++ b/ssh.c | 28 | +++ b/ssh.c |
108 | @@ -421,7 +421,12 @@ | 29 | @@ -624,7 +624,7 @@ |
109 | options.exit_on_forward_failure = 1; | ||
110 | break; | ||
111 | case 'q': | ||
112 | - options.log_level = SYSLOG_LEVEL_QUIET; | ||
113 | + if (options.log_level == SYSLOG_LEVEL_QUIET) { | ||
114 | + options.log_level = SYSLOG_LEVEL_SILENT; | ||
115 | + } | ||
116 | + else if (options.log_level != SYSLOG_LEVEL_SILENT) { | ||
117 | + options.log_level = SYSLOG_LEVEL_QUIET; | ||
118 | + } | ||
119 | break; | ||
120 | case 'e': | ||
121 | if (optarg[0] == '^' && optarg[2] == 0 && | ||
122 | @@ -624,7 +629,7 @@ | ||
123 | tty_flag = 0; | 30 | tty_flag = 0; |
124 | /* Do not allocate a tty if stdin is not a tty. */ | 31 | /* Do not allocate a tty if stdin is not a tty. */ |
125 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { | 32 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { |
126 | - if (tty_flag) | 33 | - if (tty_flag) |
127 | + if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET) | 34 | + if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) |
128 | logit("Pseudo-terminal will not be allocated because " | 35 | logit("Pseudo-terminal will not be allocated because " |
129 | "stdin is not a terminal."); | 36 | "stdin is not a terminal."); |
130 | tty_flag = 0; | 37 | tty_flag = 0; |
131 | Index: b/ssh_config.5 | ||
132 | =================================================================== | ||
133 | --- a/ssh_config.5 | ||
134 | +++ b/ssh_config.5 | ||
135 | @@ -698,7 +698,7 @@ | ||
136 | Gives the verbosity level that is used when logging messages from | ||
137 | .Xr ssh 1 . | ||
138 | The possible values are: | ||
139 | -QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. | ||
140 | +SILENT, QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. | ||
141 | The default is INFO. | ||
142 | DEBUG and DEBUG1 are equivalent. | ||
143 | DEBUG2 and DEBUG3 each specify higher levels of verbose output. | ||
144 | Index: b/sshd.8 | ||
145 | =================================================================== | ||
146 | --- a/sshd.8 | ||
147 | +++ b/sshd.8 | ||
148 | @@ -217,9 +217,12 @@ | ||
149 | option override command-line ports. | ||
150 | .It Fl q | ||
151 | Quiet mode. | ||
152 | -Nothing is sent to the system log. | ||
153 | +Only fatal errors are sent to the system log. | ||
154 | Normally the beginning, | ||
155 | authentication, and termination of each connection is logged. | ||
156 | +If a second | ||
157 | +.Fl q | ||
158 | +is given then nothing is sent to the system log. | ||
159 | .It Fl T | ||
160 | Extended test mode. | ||
161 | Check the validity of the configuration file, output the effective configuration | ||
162 | Index: b/sshd.c | ||
163 | =================================================================== | ||
164 | --- a/sshd.c | ||
165 | +++ b/sshd.c | ||
166 | @@ -1370,7 +1370,12 @@ | ||
167 | /* ignored */ | ||
168 | break; | ||
169 | case 'q': | ||
170 | - options.log_level = SYSLOG_LEVEL_QUIET; | ||
171 | + if (options.log_level == SYSLOG_LEVEL_QUIET) { | ||
172 | + options.log_level = SYSLOG_LEVEL_SILENT; | ||
173 | + } | ||
174 | + else if (options.log_level != SYSLOG_LEVEL_SILENT) { | ||
175 | + options.log_level = SYSLOG_LEVEL_QUIET; | ||
176 | + } | ||
177 | break; | ||
178 | case 'b': | ||
179 | options.server_key_bits = (int)strtonum(optarg, 256, | ||
180 | Index: b/sshd_config.5 | ||
181 | =================================================================== | ||
182 | --- a/sshd_config.5 | ||
183 | +++ b/sshd_config.5 | ||
184 | @@ -575,7 +575,7 @@ | ||
185 | Gives the verbosity level that is used when logging messages from | ||
186 | .Xr sshd 8 . | ||
187 | The possible values are: | ||
188 | -QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. | ||
189 | +SILENT, QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. | ||
190 | The default is INFO. | ||
191 | DEBUG and DEBUG1 are equivalent. | ||
192 | DEBUG2 and DEBUG3 each specify higher levels of debugging output. | ||
diff --git a/debian/patches/user-group-modes.patch b/debian/patches/user-group-modes.patch index 375a098f9..22cb3084a 100644 --- a/debian/patches/user-group-modes.patch +++ b/debian/patches/user-group-modes.patch | |||
@@ -60,7 +60,7 @@ Index: b/ssh.1 | |||
60 | =================================================================== | 60 | =================================================================== |
61 | --- a/ssh.1 | 61 | --- a/ssh.1 |
62 | +++ b/ssh.1 | 62 | +++ b/ssh.1 |
63 | @@ -1326,6 +1326,8 @@ | 63 | @@ -1321,6 +1321,8 @@ |
64 | .Xr ssh_config 5 . | 64 | .Xr ssh_config 5 . |
65 | Because of the potential for abuse, this file must have strict permissions: | 65 | Because of the potential for abuse, this file must have strict permissions: |
66 | read/write for the user, and not accessible by others. | 66 | read/write for the user, and not accessible by others. |
@@ -90,7 +90,7 @@ static struct { | |||
90 | LogLevel val; | 90 | LogLevel val; |
91 | } log_levels[] = | 91 | } log_levels[] = |
92 | { | 92 | { |
93 | { "SILENT", SYSLOG_LEVEL_SILENT }, | 93 | { "SILENT", SYSLOG_LEVEL_QUIET }, /* compatibility */ |
94 | { "QUIET", SYSLOG_LEVEL_QUIET }, | 94 | { "QUIET", SYSLOG_LEVEL_QUIET }, |
95 | { "FATAL", SYSLOG_LEVEL_FATAL }, | 95 | { "FATAL", SYSLOG_LEVEL_FATAL }, |
96 | { "ERROR", SYSLOG_LEVEL_ERROR }, | 96 | { "ERROR", SYSLOG_LEVEL_ERROR }, |
@@ -245,7 +245,6 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr) | |||
245 | argv0 = av0; | 245 | argv0 = av0; |
246 | 246 | ||
247 | switch (level) { | 247 | switch (level) { |
248 | case SYSLOG_LEVEL_SILENT: | ||
249 | case SYSLOG_LEVEL_QUIET: | 248 | case SYSLOG_LEVEL_QUIET: |
250 | case SYSLOG_LEVEL_FATAL: | 249 | case SYSLOG_LEVEL_FATAL: |
251 | case SYSLOG_LEVEL_ERROR: | 250 | case SYSLOG_LEVEL_ERROR: |
@@ -35,7 +35,6 @@ typedef enum { | |||
35 | } SyslogFacility; | 35 | } SyslogFacility; |
36 | 36 | ||
37 | typedef enum { | 37 | typedef enum { |
38 | SYSLOG_LEVEL_SILENT, | ||
39 | SYSLOG_LEVEL_QUIET, | 38 | SYSLOG_LEVEL_QUIET, |
40 | SYSLOG_LEVEL_FATAL, | 39 | SYSLOG_LEVEL_FATAL, |
41 | SYSLOG_LEVEL_ERROR, | 40 | SYSLOG_LEVEL_ERROR, |
@@ -1553,7 +1553,7 @@ mux_client_request_session(int fd) | |||
1553 | } else | 1553 | } else |
1554 | debug2("Received exit status from master %d", exitval); | 1554 | debug2("Received exit status from master %d", exitval); |
1555 | 1555 | ||
1556 | if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET) | 1556 | if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) |
1557 | fprintf(stderr, "Shared connection to %s closed.\r\n", host); | 1557 | fprintf(stderr, "Shared connection to %s closed.\r\n", host); |
1558 | 1558 | ||
1559 | exit(exitval); | 1559 | exit(exitval); |
diff --git a/sftp-server.8 b/sftp-server.8 index 69ad8beb1..bb19c15e1 100644 --- a/sftp-server.8 +++ b/sftp-server.8 | |||
@@ -74,7 +74,7 @@ usage information. | |||
74 | Specifies which messages will be logged by | 74 | Specifies which messages will be logged by |
75 | .Nm . | 75 | .Nm . |
76 | The possible values are: | 76 | The possible values are: |
77 | SILENT, QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. | 77 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. |
78 | INFO and VERBOSE log transactions that | 78 | INFO and VERBOSE log transactions that |
79 | .Nm | 79 | .Nm |
80 | performs on behalf of the client. | 80 | performs on behalf of the client. |
@@ -504,11 +504,6 @@ per-host basis in the configuration file. | |||
504 | .It Fl q | 504 | .It Fl q |
505 | Quiet mode. | 505 | Quiet mode. |
506 | Causes most warning and diagnostic messages to be suppressed. | 506 | Causes most warning and diagnostic messages to be suppressed. |
507 | Only fatal errors are displayed. | ||
508 | If a second | ||
509 | .Fl q | ||
510 | is given then even fatal errors are suppressed, except for those produced | ||
511 | due solely to bad arguments. | ||
512 | .It Fl R Xo | 507 | .It Fl R Xo |
513 | .Sm off | 508 | .Sm off |
514 | .Oo Ar bind_address : Oc | 509 | .Oo Ar bind_address : Oc |
@@ -421,12 +421,7 @@ main(int ac, char **av) | |||
421 | options.exit_on_forward_failure = 1; | 421 | options.exit_on_forward_failure = 1; |
422 | break; | 422 | break; |
423 | case 'q': | 423 | case 'q': |
424 | if (options.log_level == SYSLOG_LEVEL_QUIET) { | 424 | options.log_level = SYSLOG_LEVEL_QUIET; |
425 | options.log_level = SYSLOG_LEVEL_SILENT; | ||
426 | } | ||
427 | else if (options.log_level != SYSLOG_LEVEL_SILENT) { | ||
428 | options.log_level = SYSLOG_LEVEL_QUIET; | ||
429 | } | ||
430 | break; | 425 | break; |
431 | case 'e': | 426 | case 'e': |
432 | if (optarg[0] == '^' && optarg[2] == 0 && | 427 | if (optarg[0] == '^' && optarg[2] == 0 && |
@@ -629,7 +624,7 @@ main(int ac, char **av) | |||
629 | tty_flag = 0; | 624 | tty_flag = 0; |
630 | /* Do not allocate a tty if stdin is not a tty. */ | 625 | /* Do not allocate a tty if stdin is not a tty. */ |
631 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { | 626 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { |
632 | if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET) | 627 | if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) |
633 | logit("Pseudo-terminal will not be allocated because " | 628 | logit("Pseudo-terminal will not be allocated because " |
634 | "stdin is not a terminal."); | 629 | "stdin is not a terminal."); |
635 | tty_flag = 0; | 630 | tty_flag = 0; |
diff --git a/ssh_config.5 b/ssh_config.5 index 0ce851aa8..91c0e1bb0 100644 --- a/ssh_config.5 +++ b/ssh_config.5 | |||
@@ -718,7 +718,7 @@ indicates that the port should be available from all interfaces. | |||
718 | Gives the verbosity level that is used when logging messages from | 718 | Gives the verbosity level that is used when logging messages from |
719 | .Xr ssh 1 . | 719 | .Xr ssh 1 . |
720 | The possible values are: | 720 | The possible values are: |
721 | SILENT, QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. | 721 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. |
722 | The default is INFO. | 722 | The default is INFO. |
723 | DEBUG and DEBUG1 are equivalent. | 723 | DEBUG and DEBUG1 are equivalent. |
724 | DEBUG2 and DEBUG3 each specify higher levels of verbose output. | 724 | DEBUG2 and DEBUG3 each specify higher levels of verbose output. |
@@ -217,12 +217,9 @@ Ports specified using the | |||
217 | option override command-line ports. | 217 | option override command-line ports. |
218 | .It Fl q | 218 | .It Fl q |
219 | Quiet mode. | 219 | Quiet mode. |
220 | Only fatal errors are sent to the system log. | 220 | Nothing is sent to the system log. |
221 | Normally the beginning, | 221 | Normally the beginning, |
222 | authentication, and termination of each connection is logged. | 222 | authentication, and termination of each connection is logged. |
223 | If a second | ||
224 | .Fl q | ||
225 | is given then nothing is sent to the system log. | ||
226 | .It Fl T | 223 | .It Fl T |
227 | Extended test mode. | 224 | Extended test mode. |
228 | Check the validity of the configuration file, output the effective configuration | 225 | Check the validity of the configuration file, output the effective configuration |
@@ -1371,12 +1371,7 @@ main(int ac, char **av) | |||
1371 | /* ignored */ | 1371 | /* ignored */ |
1372 | break; | 1372 | break; |
1373 | case 'q': | 1373 | case 'q': |
1374 | if (options.log_level == SYSLOG_LEVEL_QUIET) { | 1374 | options.log_level = SYSLOG_LEVEL_QUIET; |
1375 | options.log_level = SYSLOG_LEVEL_SILENT; | ||
1376 | } | ||
1377 | else if (options.log_level != SYSLOG_LEVEL_SILENT) { | ||
1378 | options.log_level = SYSLOG_LEVEL_QUIET; | ||
1379 | } | ||
1380 | break; | 1375 | break; |
1381 | case 'b': | 1376 | case 'b': |
1382 | options.server_key_bits = (int)strtonum(optarg, 256, | 1377 | options.server_key_bits = (int)strtonum(optarg, 256, |
diff --git a/sshd_config.5 b/sshd_config.5 index 39ef781ff..de447bce5 100644 --- a/sshd_config.5 +++ b/sshd_config.5 | |||
@@ -606,7 +606,7 @@ The default is 120 seconds. | |||
606 | Gives the verbosity level that is used when logging messages from | 606 | Gives the verbosity level that is used when logging messages from |
607 | .Xr sshd 8 . | 607 | .Xr sshd 8 . |
608 | The possible values are: | 608 | The possible values are: |
609 | SILENT, QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. | 609 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. |
610 | The default is INFO. | 610 | The default is INFO. |
611 | DEBUG and DEBUG1 are equivalent. | 611 | DEBUG and DEBUG1 are equivalent. |
612 | DEBUG2 and DEBUG3 each specify higher levels of debugging output. | 612 | DEBUG2 and DEBUG3 each specify higher levels of debugging output. |