summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2010-03-31 11:34:21 +0100
committerColin Watson <cjwatson@debian.org>2010-03-31 11:34:21 +0100
commit21653cc01f15857ec36fc5ec24aecf1d39c2855f (patch)
tree37140a381e866f78560ed021bd32b58e7d285cb6 /debian
parent69456e98a770b7e946b416e5a41ec6288a31e22f (diff)
Drop most of our "LogLevel SILENT" (-qq) patch. This was originally
introduced to match the behaviour of non-free SSH, in which -q does not suppress fatal errors, but matching the behaviour of OpenSSH upstream is much more important nowadays. We no longer document that -q does not suppress fatal errors (closes: #280609). Migrate "LogLevel SILENT" to "LogLevel QUIET" in sshd_config on upgrade.
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog6
-rw-r--r--debian/openssh-server.postinst12
-rw-r--r--debian/patches/doc-connection-sharing.patch2
-rw-r--r--debian/patches/openbsd-docs.patch6
-rw-r--r--debian/patches/ssh-argv0.patch2
-rw-r--r--debian/patches/syslog-level-silent.patch177
-rw-r--r--debian/patches/user-group-modes.patch2
7 files changed, 35 insertions, 172 deletions
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
237fix_loglevel_silent() {
238 if [ "$(get_config_option LogLevel)" = SILENT ]; then
239 set_config_option LogLevel QUIET
240 fi
241}
242
243
237create_sshdconfig() { 244create_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 @@
1Description: Add "LogLevel SILENT" (-qq), suppressing even fatal errors 1Description: "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.
12Author: Jonathan David Amery <jdamery@ysolde.ucam.org> 8Author: Jonathan David Amery <jdamery@ysolde.ucam.org>
13Author: Matthew Vernon <matthew@debian.org> 9Author: Matthew Vernon <matthew@debian.org>
14Author: Colin Watson <cjwatson@debian.org> 10Author: Colin Watson <cjwatson@debian.org>
15Last-Update: 2010-02-27 11Last-Update: 2010-03-31
16 12
17Index: 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));
30Index: b/log.c 13Index: 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:
50Index: 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,
62Index: 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);
75Index: 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.
88Index: 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
104Index: b/ssh.c 25Index: 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;
131Index: 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.
144Index: 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
162Index: 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,
180Index: 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.