summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2013-05-16 14:04:24 +0100
committerColin Watson <cjwatson@debian.org>2013-05-16 14:04:24 +0100
commit031d51614426a5d5ad42f971831df373f5d6e6d8 (patch)
tree6a66dc70fd3444ea8064f25256bd2fccdce6e3cd
parent43587d4ea4349c7b98edcde117f37e6ca2e1b674 (diff)
parent328b60656f29db6306994d7498dede386ec2d1c3 (diff)
* New upstream release (http://www.openssh.com/txt/release-6.2p2):
- Only warn for missing identity files that were explicitly specified (closes: #708275). - Fix bug in contributed contrib/ssh-copy-id script that could result in "rm *" being called on mktemp failure (closes: #708419).
-rw-r--r--ChangeLog42
-rw-r--r--README4
-rw-r--r--contrib/caldera/openssh.spec4
-rw-r--r--contrib/redhat/openssh.spec2
-rw-r--r--contrib/ssh-copy-id9
-rw-r--r--contrib/suse/openssh.spec2
-rw-r--r--debian/changelog10
-rw-r--r--debian/patches/debian-config.patch4
-rw-r--r--debian/patches/gssapi.patch8
-rw-r--r--debian/patches/keepalive-extensions.patch6
-rw-r--r--debian/patches/mention-ssh-keygen-on-keychange.patch6
-rw-r--r--debian/patches/package-versioning.patch6
-rw-r--r--debian/patches/shell-path.patch6
-rw-r--r--debian/patches/ssh-vulnkey.patch12
-rw-r--r--debian/patches/syslog-level-silent.patch4
-rw-r--r--debian/patches/user-group-modes.patch4
-rw-r--r--krl.c2
-rw-r--r--openbsd-compat/bsd-cygwin_util.c11
-rw-r--r--openbsd-compat/bsd-cygwin_util.h17
-rw-r--r--packet.c8
-rw-r--r--readconf.c64
-rw-r--r--readconf.h10
-rw-r--r--ssh.c20
-rw-r--r--sshconnect.c9
-rw-r--r--sshconnect2.c4
-rw-r--r--version.h2
26 files changed, 174 insertions, 102 deletions
diff --git a/ChangeLog b/ChangeLog
index dbd8b0aa9..f5e2df0d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,45 @@
120130516
2 - (djm) [contrib/ssh-copy-id] Fix bug that could cause "rm *" to be
3 executed if mktemp failed; bz#2105 ok dtucker@
4 - (djm) Release 6.2p2
5
620130510
7 - (djm) OpenBSD CVS Cherrypick
8 - djm@cvs.openbsd.org 2013/04/11 02:27:50
9 [packet.c]
10 quiet disconnect notifications on the server from error() back to logit()
11 if it is a normal client closure; bz#2057 ok+feedback dtucker@
12 - (djm) [version.h contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
13 [contrib/suse/openssh.spec] Crank version numbers for release.
14 - (djm) [README] Update release notes URL
15
1620130404
17 - (dtucker) OpenBSD CVS Sync
18 - dtucker@cvs.openbsd.org 2013/02/17 23:16:57
19 [readconf.c ssh.c readconf.h sshconnect2.c]
20 Keep track of which IndentityFile options were manually supplied and which
21 were default options, and don't warn if the latter are missing.
22 ok markus@
23 - dtucker@cvs.openbsd.org 2013/02/19 02:12:47
24 [krl.c]
25 Remove bogus include. ok djm
26 - dtucker@cvs.openbsd.org 2013/02/22 04:45:09
27 [ssh.c readconf.c readconf.h]
28 Don't complain if IdentityFiles specified in system-wide configs are
29 missing. ok djm, deraadt.
30 - markus@cvs.openbsd.org 2013/02/22 19:13:56
31 [sshconnect.c]
32 support ProxyCommand=- (stdin/out already point to the proxy); ok djm@
33 - djm@cvs.openbsd.org 2013/02/22 22:09:01
34 [ssh.c]
35 Allow IdenityFile=none; ok markus deraadt (and dtucker for an earlier
36 version)
37
3820130401
39 - (dtucker) [openbsd-compat/bsd-cygwin_util.{c,h}] Don't include windows.h
40 to avoid conflicting definitions of __int64, adding the required bits.
41 Patch from Corinna Vinschen.
42
120120322 4320120322
2 - (djm) [contrib/ssh-copy-id contrib/ssh-copy-id.1] Updated to Phil 44 - (djm) [contrib/ssh-copy-id contrib/ssh-copy-id.1] Updated to Phil
3 Hands' greatly revised version. 45 Hands' greatly revised version.
diff --git a/README b/README
index 21dc6e1f7..52bb657d6 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
1See http://www.openssh.com/txt/release-6.2 for the release notes. 1See http://www.openssh.com/txt/release-6.2p2 for the release notes.
2 2
3- A Japanese translation of this document and of the OpenSSH FAQ is 3- A Japanese translation of this document and of the OpenSSH FAQ is
4- available at http://www.unixuser.org/~haruyama/security/openssh/index.html 4- available at http://www.unixuser.org/~haruyama/security/openssh/index.html
@@ -62,4 +62,4 @@ References -
62[6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9 62[6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9
63[7] http://www.openssh.com/faq.html 63[7] http://www.openssh.com/faq.html
64 64
65$Id: README,v 1.82 2013/02/26 23:48:19 djm Exp $ 65$Id: README,v 1.82.2.1 2013/05/10 06:12:54 djm Exp $
diff --git a/contrib/caldera/openssh.spec b/contrib/caldera/openssh.spec
index 196bd7904..ca34bd23a 100644
--- a/contrib/caldera/openssh.spec
+++ b/contrib/caldera/openssh.spec
@@ -16,7 +16,7 @@
16 16
17#old cvs stuff. please update before use. may be deprecated. 17#old cvs stuff. please update before use. may be deprecated.
18%define use_stable 1 18%define use_stable 1
19%define version 6.2p1 19%define version 6.2p2
20%if %{use_stable} 20%if %{use_stable}
21 %define cvs %{nil} 21 %define cvs %{nil}
22 %define release 1 22 %define release 1
@@ -363,4 +363,4 @@ fi
363* Mon Jan 01 1998 ... 363* Mon Jan 01 1998 ...
364Template Version: 1.31 364Template Version: 1.31
365 365
366$Id: openssh.spec,v 1.79 2013/02/26 23:48:20 djm Exp $ 366$Id: openssh.spec,v 1.79.2.1 2013/05/10 06:02:21 djm Exp $
diff --git a/contrib/redhat/openssh.spec b/contrib/redhat/openssh.spec
index 3898c6c99..cd5378ed2 100644
--- a/contrib/redhat/openssh.spec
+++ b/contrib/redhat/openssh.spec
@@ -1,4 +1,4 @@
1%define ver 6.2p1 1%define ver 6.2p2
2%define rel 1 2%define rel 1
3 3
4# OpenSSH privilege separation requires a user & group ID 4# OpenSSH privilege separation requires a user & group ID
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
index af18a1929..9f2817b6b 100644
--- a/contrib/ssh-copy-id
+++ b/contrib/ssh-copy-id
@@ -165,6 +165,9 @@ done
165 165
166eval set -- "$SAVEARGS" 166eval set -- "$SAVEARGS"
167 167
168if [ $# == 0 ] ; then
169 usage
170fi
168if [ $# != 1 ] ; then 171if [ $# != 1 ] ; then
169 printf '%s: ERROR: Too many arguments. Expecting a target hostname, got: %s\n\n' "$0" "$SAVEARGS" >&2 172 printf '%s: ERROR: Too many arguments. Expecting a target hostname, got: %s\n\n' "$0" "$SAVEARGS" >&2
170 usage 173 usage
@@ -196,7 +199,11 @@ populate_new_ids() {
196 199
197 umask 0177 200 umask 0177
198 local L_TMP_ID_FILE=$(mktemp ~/.ssh/ssh-copy-id_id.XXXXXXXXXX) 201 local L_TMP_ID_FILE=$(mktemp ~/.ssh/ssh-copy-id_id.XXXXXXXXXX)
199 trap "rm -f $L_TMP_ID_FILE*" EXIT TERM INT QUIT 202 if test $? -ne 0 || test "x$L_TMP_ID_FILE" = "x" ; then
203 echo "mktemp failed" 1>&2
204 exit 1
205 fi
206 trap "rm -f $L_TMP_ID_FILE ${L_TMP_ID_FILE}.pub" EXIT TERM INT QUIT
200 printf '%s: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n' "$0" >&2 207 printf '%s: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n' "$0" >&2
201 NEW_IDS=$( 208 NEW_IDS=$(
202 eval $GET_ID | { 209 eval $GET_ID | {
diff --git a/contrib/suse/openssh.spec b/contrib/suse/openssh.spec
index 960feae07..bb9e50bd9 100644
--- a/contrib/suse/openssh.spec
+++ b/contrib/suse/openssh.spec
@@ -13,7 +13,7 @@
13 13
14Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation 14Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
15Name: openssh 15Name: openssh
16Version: 6.2p1 16Version: 6.2p2
17URL: http://www.openssh.com/ 17URL: http://www.openssh.com/
18Release: 1 18Release: 1
19Source0: openssh-%{version}.tar.gz 19Source0: openssh-%{version}.tar.gz
diff --git a/debian/changelog b/debian/changelog
index b63fe90e9..b048e8927 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
1openssh (1:6.2p2-1) UNRELEASED; urgency=low
2
3 * New upstream release (http://www.openssh.com/txt/release-6.2p2):
4 - Only warn for missing identity files that were explicitly specified
5 (closes: #708275).
6 - Fix bug in contributed contrib/ssh-copy-id script that could result in
7 "rm *" being called on mktemp failure (closes: #708419).
8
9 -- Colin Watson <cjwatson@debian.org> Thu, 16 May 2013 13:56:20 +0100
10
1openssh (1:6.2p1-3) unstable; urgency=low 11openssh (1:6.2p1-3) unstable; urgency=low
2 12
3 * Renumber Debian-specific additions to enum monitor_reqtype so that they 13 * Renumber Debian-specific additions to enum monitor_reqtype so that they
diff --git a/debian/patches/debian-config.patch b/debian/patches/debian-config.patch
index 77e807502..45a8364ca 100644
--- a/debian/patches/debian-config.patch
+++ b/debian/patches/debian-config.patch
@@ -18,13 +18,13 @@ Description: Various Debian-specific configuration changes
18Author: Colin Watson <cjwatson@debian.org> 18Author: Colin Watson <cjwatson@debian.org>
19Author: Russ Allbery <rra@debian.org> 19Author: Russ Allbery <rra@debian.org>
20Forwarded: not-needed 20Forwarded: not-needed
21Last-Update: 2013-05-07 21Last-Update: 2013-05-16
22 22
23Index: b/readconf.c 23Index: b/readconf.c
24=================================================================== 24===================================================================
25--- a/readconf.c 25--- a/readconf.c
26+++ b/readconf.c 26+++ b/readconf.c
27@@ -1269,7 +1269,7 @@ 27@@ -1288,7 +1288,7 @@
28 if (options->forward_x11 == -1) 28 if (options->forward_x11 == -1)
29 options->forward_x11 = 0; 29 options->forward_x11 = 0;
30 if (options->forward_x11_trusted == -1) 30 if (options->forward_x11_trusted == -1)
diff --git a/debian/patches/gssapi.patch b/debian/patches/gssapi.patch
index ce50db505..416e2f16c 100644
--- a/debian/patches/gssapi.patch
+++ b/debian/patches/gssapi.patch
@@ -13,7 +13,7 @@ Description: GSSAPI key exchange support
13 security history. 13 security history.
14Author: Simon Wilkinson <simon@sxw.org.uk> 14Author: Simon Wilkinson <simon@sxw.org.uk>
15Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1242 15Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1242
16Last-Updated: 2013-05-13 16Last-Updated: 2013-05-16
17 17
18Index: b/ChangeLog.gssapi 18Index: b/ChangeLog.gssapi
19=================================================================== 19===================================================================
@@ -2327,7 +2327,7 @@ Index: b/readconf.c
2327 #endif 2327 #endif
2328 { "fallbacktorsh", oDeprecated }, 2328 { "fallbacktorsh", oDeprecated },
2329 { "usersh", oDeprecated }, 2329 { "usersh", oDeprecated },
2330@@ -483,10 +494,30 @@ 2330@@ -503,10 +514,30 @@
2331 intptr = &options->gss_authentication; 2331 intptr = &options->gss_authentication;
2332 goto parse_flag; 2332 goto parse_flag;
2333 2333
@@ -2358,7 +2358,7 @@ Index: b/readconf.c
2358 case oBatchMode: 2358 case oBatchMode:
2359 intptr = &options->batch_mode; 2359 intptr = &options->batch_mode;
2360 goto parse_flag; 2360 goto parse_flag;
2361@@ -1139,7 +1170,12 @@ 2361@@ -1158,7 +1189,12 @@
2362 options->pubkey_authentication = -1; 2362 options->pubkey_authentication = -1;
2363 options->challenge_response_authentication = -1; 2363 options->challenge_response_authentication = -1;
2364 options->gss_authentication = -1; 2364 options->gss_authentication = -1;
@@ -2371,7 +2371,7 @@ Index: b/readconf.c
2371 options->password_authentication = -1; 2371 options->password_authentication = -1;
2372 options->kbd_interactive_authentication = -1; 2372 options->kbd_interactive_authentication = -1;
2373 options->kbd_interactive_devices = NULL; 2373 options->kbd_interactive_devices = NULL;
2374@@ -1239,8 +1275,14 @@ 2374@@ -1258,8 +1294,14 @@
2375 options->challenge_response_authentication = 1; 2375 options->challenge_response_authentication = 1;
2376 if (options->gss_authentication == -1) 2376 if (options->gss_authentication == -1)
2377 options->gss_authentication = 0; 2377 options->gss_authentication = 0;
diff --git a/debian/patches/keepalive-extensions.patch b/debian/patches/keepalive-extensions.patch
index 028bd62e5..98e9f8bdd 100644
--- a/debian/patches/keepalive-extensions.patch
+++ b/debian/patches/keepalive-extensions.patch
@@ -12,7 +12,7 @@ Author: Richard Kettlewell <rjk@greenend.org.uk>
12Author: Ian Jackson <ian@chiark.greenend.org.uk> 12Author: Ian Jackson <ian@chiark.greenend.org.uk>
13Author: Matthew Vernon <matthew@debian.org> 13Author: Matthew Vernon <matthew@debian.org>
14Author: Colin Watson <cjwatson@debian.org> 14Author: Colin Watson <cjwatson@debian.org>
15Last-Update: 2013-05-07 15Last-Update: 2013-05-16
16 16
17Index: b/readconf.c 17Index: b/readconf.c
18=================================================================== 18===================================================================
@@ -35,7 +35,7 @@ Index: b/readconf.c
35 35
36 { NULL, oBadOption } 36 { NULL, oBadOption }
37 }; 37 };
38@@ -915,6 +918,8 @@ 38@@ -933,6 +936,8 @@
39 goto parse_flag; 39 goto parse_flag;
40 40
41 case oServerAliveInterval: 41 case oServerAliveInterval:
@@ -44,7 +44,7 @@ Index: b/readconf.c
44 intptr = &options->server_alive_interval; 44 intptr = &options->server_alive_interval;
45 goto parse_time; 45 goto parse_time;
46 46
47@@ -1386,8 +1391,13 @@ 47@@ -1392,8 +1397,13 @@
48 options->rekey_limit = 0; 48 options->rekey_limit = 0;
49 if (options->verify_host_key_dns == -1) 49 if (options->verify_host_key_dns == -1)
50 options->verify_host_key_dns = 0; 50 options->verify_host_key_dns = 0;
diff --git a/debian/patches/mention-ssh-keygen-on-keychange.patch b/debian/patches/mention-ssh-keygen-on-keychange.patch
index fa7c725b4..fd1b6f9f5 100644
--- a/debian/patches/mention-ssh-keygen-on-keychange.patch
+++ b/debian/patches/mention-ssh-keygen-on-keychange.patch
@@ -2,13 +2,13 @@ Description: Mention ssh-keygen in ssh fingerprint changed warning
2Author: Scott Moser <smoser@ubuntu.com> 2Author: Scott Moser <smoser@ubuntu.com>
3Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1843 3Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1843
4Bug-Ubuntu: https://bugs.launchpad.net/bugs/686607 4Bug-Ubuntu: https://bugs.launchpad.net/bugs/686607
5Last-Update: 2013-05-07 5Last-Update: 2013-05-16
6 6
7Index: b/sshconnect.c 7Index: b/sshconnect.c
8=================================================================== 8===================================================================
9--- a/sshconnect.c 9--- a/sshconnect.c
10+++ b/sshconnect.c 10+++ b/sshconnect.c
11@@ -975,9 +975,12 @@ 11@@ -982,9 +982,12 @@
12 error("%s. This could either mean that", key_msg); 12 error("%s. This could either mean that", key_msg);
13 error("DNS SPOOFING is happening or the IP address for the host"); 13 error("DNS SPOOFING is happening or the IP address for the host");
14 error("and its host key have changed at the same time."); 14 error("and its host key have changed at the same time.");
@@ -22,7 +22,7 @@ Index: b/sshconnect.c
22 } 22 }
23 /* The host key has changed. */ 23 /* The host key has changed. */
24 warn_changed_key(host_key); 24 warn_changed_key(host_key);
25@@ -985,6 +988,8 @@ 25@@ -992,6 +995,8 @@
26 user_hostfiles[0]); 26 user_hostfiles[0]);
27 error("Offending %s key in %s:%lu", key_type(host_found->key), 27 error("Offending %s key in %s:%lu", key_type(host_found->key),
28 host_found->file, host_found->line); 28 host_found->file, host_found->line);
diff --git a/debian/patches/package-versioning.patch b/debian/patches/package-versioning.patch
index c337ad671..b922a185b 100644
--- a/debian/patches/package-versioning.patch
+++ b/debian/patches/package-versioning.patch
@@ -5,13 +5,13 @@ Description: Include the Debian version in our identification
5 vulnerable-looking version strings. (However, see debian-banner.patch.) 5 vulnerable-looking version strings. (However, see debian-banner.patch.)
6Author: Matthew Vernon <matthew@debian.org> 6Author: Matthew Vernon <matthew@debian.org>
7Forwarded: not-needed 7Forwarded: not-needed
8Last-Update: 2013-05-07 8Last-Update: 2013-05-16
9 9
10Index: b/sshconnect.c 10Index: b/sshconnect.c
11=================================================================== 11===================================================================
12--- a/sshconnect.c 12--- a/sshconnect.c
13+++ b/sshconnect.c 13+++ b/sshconnect.c
14@@ -435,10 +435,10 @@ 14@@ -442,10 +442,10 @@
15 /* Send our own protocol version identification. */ 15 /* Send our own protocol version identification. */
16 if (compat20) { 16 if (compat20) {
17 xasprintf(&client_version_string, "SSH-%d.%d-%.100s\r\n", 17 xasprintf(&client_version_string, "SSH-%d.%d-%.100s\r\n",
@@ -44,7 +44,7 @@ Index: b/version.h
44@@ -3,4 +3,9 @@ 44@@ -3,4 +3,9 @@
45 #define SSH_VERSION "OpenSSH_6.2" 45 #define SSH_VERSION "OpenSSH_6.2"
46 46
47 #define SSH_PORTABLE "p1" 47 #define SSH_PORTABLE "p2"
48-#define SSH_RELEASE SSH_VERSION SSH_PORTABLE 48-#define SSH_RELEASE SSH_VERSION SSH_PORTABLE
49+#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE 49+#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE
50+#ifdef SSH_EXTRAVERSION 50+#ifdef SSH_EXTRAVERSION
diff --git a/debian/patches/shell-path.patch b/debian/patches/shell-path.patch
index 4c4532e99..d4cbc3e5f 100644
--- a/debian/patches/shell-path.patch
+++ b/debian/patches/shell-path.patch
@@ -4,13 +4,13 @@ Description: Look for $SHELL on the path for ProxyCommand/LocalCommand
4Author: Colin Watson <cjwatson@debian.org> 4Author: Colin Watson <cjwatson@debian.org>
5Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1494 5Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1494
6Bug-Debian: http://bugs.debian.org/492728 6Bug-Debian: http://bugs.debian.org/492728
7Last-Update: 2013-05-07 7Last-Update: 2013-05-16
8 8
9Index: b/sshconnect.c 9Index: b/sshconnect.c
10=================================================================== 10===================================================================
11--- a/sshconnect.c 11--- a/sshconnect.c
12+++ b/sshconnect.c 12+++ b/sshconnect.c
13@@ -144,7 +144,7 @@ 13@@ -151,7 +151,7 @@
14 /* Execute the proxy command. Note that we gave up any 14 /* Execute the proxy command. Note that we gave up any
15 extra privileges above. */ 15 extra privileges above. */
16 signal(SIGPIPE, SIG_DFL); 16 signal(SIGPIPE, SIG_DFL);
@@ -19,7 +19,7 @@ Index: b/sshconnect.c
19 perror(argv[0]); 19 perror(argv[0]);
20 exit(1); 20 exit(1);
21 } 21 }
22@@ -1292,7 +1292,7 @@ 22@@ -1299,7 +1299,7 @@
23 if (pid == 0) { 23 if (pid == 0) {
24 signal(SIGPIPE, SIG_DFL); 24 signal(SIGPIPE, SIG_DFL);
25 debug3("Executing %s -c \"%s\"", shell, args); 25 debug3("Executing %s -c \"%s\"", shell, args);
diff --git a/debian/patches/ssh-vulnkey.patch b/debian/patches/ssh-vulnkey.patch
index b7531cce0..03d6f15d9 100644
--- a/debian/patches/ssh-vulnkey.patch
+++ b/debian/patches/ssh-vulnkey.patch
@@ -8,7 +8,7 @@ Description: Reject vulnerable keys to mitigate Debian OpenSSL flaw
8 See CVE-2008-0166. 8 See CVE-2008-0166.
9Author: Colin Watson <cjwatson@ubuntu.com> 9Author: Colin Watson <cjwatson@ubuntu.com>
10Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1469 10Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1469
11Last-Update: 2013-05-07 11Last-Update: 2013-05-16
12 12
13Index: b/Makefile.in 13Index: b/Makefile.in
14=================================================================== 14===================================================================
@@ -420,7 +420,7 @@ Index: b/readconf.c
420 { "rsaauthentication", oRSAAuthentication }, 420 { "rsaauthentication", oRSAAuthentication },
421 { "pubkeyauthentication", oPubkeyAuthentication }, 421 { "pubkeyauthentication", oPubkeyAuthentication },
422 { "dsaauthentication", oPubkeyAuthentication }, /* alias */ 422 { "dsaauthentication", oPubkeyAuthentication }, /* alias */
423@@ -490,6 +492,10 @@ 423@@ -510,6 +512,10 @@
424 intptr = &options->challenge_response_authentication; 424 intptr = &options->challenge_response_authentication;
425 goto parse_flag; 425 goto parse_flag;
426 426
@@ -431,7 +431,7 @@ Index: b/readconf.c
431 case oGssAuthentication: 431 case oGssAuthentication:
432 intptr = &options->gss_authentication; 432 intptr = &options->gss_authentication;
433 goto parse_flag; 433 goto parse_flag;
434@@ -1181,6 +1187,7 @@ 434@@ -1200,6 +1206,7 @@
435 options->kbd_interactive_devices = NULL; 435 options->kbd_interactive_devices = NULL;
436 options->rhosts_rsa_authentication = -1; 436 options->rhosts_rsa_authentication = -1;
437 options->hostbased_authentication = -1; 437 options->hostbased_authentication = -1;
@@ -439,7 +439,7 @@ Index: b/readconf.c
439 options->batch_mode = -1; 439 options->batch_mode = -1;
440 options->check_host_ip = -1; 440 options->check_host_ip = -1;
441 options->strict_host_key_checking = -1; 441 options->strict_host_key_checking = -1;
442@@ -1291,6 +1298,8 @@ 442@@ -1310,6 +1317,8 @@
443 options->rhosts_rsa_authentication = 0; 443 options->rhosts_rsa_authentication = 0;
444 if (options->hostbased_authentication == -1) 444 if (options->hostbased_authentication == -1)
445 options->hostbased_authentication = 0; 445 options->hostbased_authentication = 0;
@@ -1247,7 +1247,7 @@ Index: b/ssh.c
1247=================================================================== 1247===================================================================
1248--- a/ssh.c 1248--- a/ssh.c
1249+++ b/ssh.c 1249+++ b/ssh.c
1250@@ -1495,7 +1495,7 @@ 1250@@ -1492,7 +1492,7 @@
1251 static void 1251 static void
1252 load_public_identity_files(void) 1252 load_public_identity_files(void)
1253 { 1253 {
@@ -1256,7 +1256,7 @@ Index: b/ssh.c
1256 char *pwdir = NULL, *pwname = NULL; 1256 char *pwdir = NULL, *pwname = NULL;
1257 int i = 0; 1257 int i = 0;
1258 Key *public; 1258 Key *public;
1259@@ -1552,6 +1552,22 @@ 1259@@ -1550,6 +1550,22 @@
1260 public = key_load_public(filename, NULL); 1260 public = key_load_public(filename, NULL);
1261 debug("identity file %s type %d", filename, 1261 debug("identity file %s type %d", filename,
1262 public ? public->type : -1); 1262 public ? public->type : -1);
diff --git a/debian/patches/syslog-level-silent.patch b/debian/patches/syslog-level-silent.patch
index 3dfc89027..2bac7c8cb 100644
--- a/debian/patches/syslog-level-silent.patch
+++ b/debian/patches/syslog-level-silent.patch
@@ -8,7 +8,7 @@ Description: "LogLevel SILENT" compatibility
8Author: Jonathan David Amery <jdamery@ysolde.ucam.org> 8Author: Jonathan David Amery <jdamery@ysolde.ucam.org>
9Author: Matthew Vernon <matthew@debian.org> 9Author: Matthew Vernon <matthew@debian.org>
10Author: Colin Watson <cjwatson@debian.org> 10Author: Colin Watson <cjwatson@debian.org>
11Last-Update: 2010-03-31 11Last-Update: 2013-05-16
12 12
13Index: b/log.c 13Index: b/log.c
14=================================================================== 14===================================================================
@@ -26,7 +26,7 @@ Index: b/ssh.c
26=================================================================== 26===================================================================
27--- a/ssh.c 27--- a/ssh.c
28+++ b/ssh.c 28+++ b/ssh.c
29@@ -714,7 +714,7 @@ 29@@ -711,7 +711,7 @@
30 /* Do not allocate a tty if stdin is not a tty. */ 30 /* Do not allocate a tty if stdin is not a tty. */
31 if ((!isatty(fileno(stdin)) || stdin_null_flag) && 31 if ((!isatty(fileno(stdin)) || stdin_null_flag) &&
32 options.request_tty != REQUEST_TTY_FORCE) { 32 options.request_tty != REQUEST_TTY_FORCE) {
diff --git a/debian/patches/user-group-modes.patch b/debian/patches/user-group-modes.patch
index 64ecbd7c8..d0de9c006 100644
--- a/debian/patches/user-group-modes.patch
+++ b/debian/patches/user-group-modes.patch
@@ -9,7 +9,7 @@ Description: Allow harmless group-writability
9Author: Colin Watson <cjwatson@debian.org> 9Author: Colin Watson <cjwatson@debian.org>
10Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1060 10Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1060
11Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314347 11Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314347
12Last-Update: 2013-05-07 12Last-Update: 2013-05-16
13 13
14Index: b/readconf.c 14Index: b/readconf.c
15=================================================================== 15===================================================================
@@ -24,7 +24,7 @@ Index: b/readconf.c
24 24
25 #include "xmalloc.h" 25 #include "xmalloc.h"
26 #include "ssh.h" 26 #include "ssh.h"
27@@ -1132,8 +1134,7 @@ 27@@ -1150,8 +1152,7 @@
28 28
29 if (fstat(fileno(f), &sb) == -1) 29 if (fstat(fileno(f), &sb) == -1)
30 fatal("fstat %s: %s", filename, strerror(errno)); 30 fatal("fstat %s: %s", filename, strerror(errno));
diff --git a/krl.c b/krl.c
index 5a6bd14aa..0d9bb5411 100644
--- a/krl.c
+++ b/krl.c
@@ -14,7 +14,7 @@
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 15 */
16 16
17/* $OpenBSD: krl.c,v 1.9 2013/01/27 10:06:12 djm Exp $ */ 17/* $OpenBSD: krl.c,v 1.10 2013/02/19 02:12:47 dtucker Exp $ */
18 18
19#include "includes.h" 19#include "includes.h"
20 20
diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
index 6befc016f..d3d2d913a 100644
--- a/openbsd-compat/bsd-cygwin_util.c
+++ b/openbsd-compat/bsd-cygwin_util.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2000, 2001, 2011 Corinna Vinschen <vinschen@redhat.com> 2 * Copyright (c) 2000, 2001, 2011, 2013 Corinna Vinschen <vinschen@redhat.com>
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
@@ -27,20 +27,15 @@
27 * binary mode on Windows systems. 27 * binary mode on Windows systems.
28 */ 28 */
29 29
30#define NO_BINARY_OPEN /* Avoid redefining open to binary_open for this file */
30#include "includes.h" 31#include "includes.h"
31 32
32#ifdef HAVE_CYGWIN 33#ifdef HAVE_CYGWIN
33 34
34#if defined(open) && open == binary_open
35# undef open
36#endif
37
38#include <sys/types.h> 35#include <sys/types.h>
39
40#include <fcntl.h> 36#include <fcntl.h>
41#include <stdlib.h> 37#include <string.h>
42#include <unistd.h> 38#include <unistd.h>
43#include <windows.h>
44 39
45#include "xmalloc.h" 40#include "xmalloc.h"
46 41
diff --git a/openbsd-compat/bsd-cygwin_util.h b/openbsd-compat/bsd-cygwin_util.h
index b4bcd04b7..6061a6b01 100644
--- a/openbsd-compat/bsd-cygwin_util.h
+++ b/openbsd-compat/bsd-cygwin_util.h
@@ -1,7 +1,7 @@
1/* $Id: bsd-cygwin_util.h,v 1.15 2012/08/28 09:57:19 dtucker Exp $ */ 1/* $Id: bsd-cygwin_util.h,v 1.15.4.1 2013/04/04 23:53:31 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001, 2011 Corinna Vinschen <vinschen@redhat.com> 4 * Copyright (c) 2000, 2001, 2011, 2013 Corinna Vinschen <vinschen@redhat.com>
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
@@ -36,24 +36,21 @@
36 36
37#undef ERROR 37#undef ERROR
38 38
39#define WIN32_LEAN_AND_MEAN 39/* Avoid including windows headers. */
40typedef void *HANDLE;
41#define INVALID_HANDLE_VALUE ((HANDLE) -1)
40 42
41#include <windows.h>
42#include <sys/cygwin.h> 43#include <sys/cygwin.h>
43#include <io.h> 44#include <io.h>
44 45
45/* Make sure _WIN32 isn't defined later in the code, otherwise headers from
46 other packages might get the wrong idea about the target system. */
47#ifdef _WIN32
48#undef _WIN32
49#endif
50
51int binary_open(const char *, int , ...); 46int binary_open(const char *, int , ...);
52int check_ntsec(const char *); 47int check_ntsec(const char *);
53char **fetch_windows_environment(void); 48char **fetch_windows_environment(void);
54void free_windows_environment(char **); 49void free_windows_environment(char **);
55 50
51#ifndef NO_BINARY_OPEN
56#define open binary_open 52#define open binary_open
53#endif
57 54
58#endif /* HAVE_CYGWIN */ 55#endif /* HAVE_CYGWIN */
59 56
diff --git a/packet.c b/packet.c
index 9326ddea6..3e835d360 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.181 2013/02/10 23:35:24 djm Exp $ */ 1/* $OpenBSD: packet.c,v 1.182 2013/04/11 02:27:50 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1460,7 +1460,11 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1460 case SSH2_MSG_DISCONNECT: 1460 case SSH2_MSG_DISCONNECT:
1461 reason = packet_get_int(); 1461 reason = packet_get_int();
1462 msg = packet_get_string(NULL); 1462 msg = packet_get_string(NULL);
1463 error("Received disconnect from %s: %u: %.400s", 1463 /* Ignore normal client exit notifications */
1464 do_log2(active_state->server_side &&
1465 reason == SSH2_DISCONNECT_BY_APPLICATION ?
1466 SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR,
1467 "Received disconnect from %s: %u: %.400s",
1464 get_remote_ipaddr(), reason, msg); 1468 get_remote_ipaddr(), reason, msg);
1465 xfree(msg); 1469 xfree(msg);
1466 cleanup_exit(255); 1470 cleanup_exit(255);
diff --git a/readconf.c b/readconf.c
index a34cbe707..0b26a6735 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.194 2011/09/23 07:45:05 markus Exp $ */ 1/* $OpenBSD: readconf.c,v 1.196 2013/02/22 04:45:08 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -344,6 +344,26 @@ clear_forwardings(Options *options)
344 options->tun_open = SSH_TUNMODE_NO; 344 options->tun_open = SSH_TUNMODE_NO;
345} 345}
346 346
347void
348add_identity_file(Options *options, const char *dir, const char *filename,
349 int userprovided)
350{
351 char *path;
352
353 if (options->num_identity_files >= SSH_MAX_IDENTITY_FILES)
354 fatal("Too many identity files specified (max %d)",
355 SSH_MAX_IDENTITY_FILES);
356
357 if (dir == NULL) /* no dir, filename is absolute */
358 path = xstrdup(filename);
359 else
360 (void)xasprintf(&path, "%.100s%.100s", dir, filename);
361
362 options->identity_file_userprovided[options->num_identity_files] =
363 userprovided;
364 options->identity_files[options->num_identity_files++] = path;
365}
366
347/* 367/*
348 * Returns the number of the token pointed to by cp or oBadOption. 368 * Returns the number of the token pointed to by cp or oBadOption.
349 */ 369 */
@@ -371,7 +391,7 @@ parse_token(const char *cp, const char *filename, int linenum)
371int 391int
372process_config_line(Options *options, const char *host, 392process_config_line(Options *options, const char *host,
373 char *line, const char *filename, int linenum, 393 char *line, const char *filename, int linenum,
374 int *activep) 394 int *activep, int userconfig)
375{ 395{
376 char *s, **charptr, *endofnumber, *keyword, *arg, *arg2; 396 char *s, **charptr, *endofnumber, *keyword, *arg, *arg2;
377 char **cpptr, fwdarg[256]; 397 char **cpptr, fwdarg[256];
@@ -628,9 +648,7 @@ parse_yesnoask:
628 if (*intptr >= SSH_MAX_IDENTITY_FILES) 648 if (*intptr >= SSH_MAX_IDENTITY_FILES)
629 fatal("%.200s line %d: Too many identity files specified (max %d).", 649 fatal("%.200s line %d: Too many identity files specified (max %d).",
630 filename, linenum, SSH_MAX_IDENTITY_FILES); 650 filename, linenum, SSH_MAX_IDENTITY_FILES);
631 charptr = &options->identity_files[*intptr]; 651 add_identity_file(options, NULL, arg, userconfig);
632 *charptr = xstrdup(arg);
633 *intptr = *intptr + 1;
634 } 652 }
635 break; 653 break;
636 654
@@ -1119,7 +1137,7 @@ parse_int:
1119 1137
1120int 1138int
1121read_config_file(const char *filename, const char *host, Options *options, 1139read_config_file(const char *filename, const char *host, Options *options,
1122 int checkperm) 1140 int flags)
1123{ 1141{
1124 FILE *f; 1142 FILE *f;
1125 char line[1024]; 1143 char line[1024];
@@ -1129,7 +1147,7 @@ read_config_file(const char *filename, const char *host, Options *options,
1129 if ((f = fopen(filename, "r")) == NULL) 1147 if ((f = fopen(filename, "r")) == NULL)
1130 return 0; 1148 return 0;
1131 1149
1132 if (checkperm) { 1150 if (flags & SSHCONF_CHECKPERM) {
1133 struct stat sb; 1151 struct stat sb;
1134 1152
1135 if (fstat(fileno(f), &sb) == -1) 1153 if (fstat(fileno(f), &sb) == -1)
@@ -1149,7 +1167,8 @@ read_config_file(const char *filename, const char *host, Options *options,
1149 while (fgets(line, sizeof(line), f)) { 1167 while (fgets(line, sizeof(line), f)) {
1150 /* Update line number counter. */ 1168 /* Update line number counter. */
1151 linenum++; 1169 linenum++;
1152 if (process_config_line(options, host, line, filename, linenum, &active) != 0) 1170 if (process_config_line(options, host, line, filename, linenum,
1171 &active, flags & SSHCONF_USERCONF) != 0)
1153 bad_options++; 1172 bad_options++;
1154 } 1173 }
1155 fclose(f); 1174 fclose(f);
@@ -1337,30 +1356,17 @@ fill_default_options(Options * options)
1337 options->protocol = SSH_PROTO_2; 1356 options->protocol = SSH_PROTO_2;
1338 if (options->num_identity_files == 0) { 1357 if (options->num_identity_files == 0) {
1339 if (options->protocol & SSH_PROTO_1) { 1358 if (options->protocol & SSH_PROTO_1) {
1340 len = 2 + strlen(_PATH_SSH_CLIENT_IDENTITY) + 1; 1359 add_identity_file(options, "~/",
1341 options->identity_files[options->num_identity_files] = 1360 _PATH_SSH_CLIENT_IDENTITY, 0);
1342 xmalloc(len);
1343 snprintf(options->identity_files[options->num_identity_files++],
1344 len, "~/%.100s", _PATH_SSH_CLIENT_IDENTITY);
1345 } 1361 }
1346 if (options->protocol & SSH_PROTO_2) { 1362 if (options->protocol & SSH_PROTO_2) {
1347 len = 2 + strlen(_PATH_SSH_CLIENT_ID_RSA) + 1; 1363 add_identity_file(options, "~/",
1348 options->identity_files[options->num_identity_files] = 1364 _PATH_SSH_CLIENT_ID_RSA, 0);
1349 xmalloc(len); 1365 add_identity_file(options, "~/",
1350 snprintf(options->identity_files[options->num_identity_files++], 1366 _PATH_SSH_CLIENT_ID_DSA, 0);
1351 len, "~/%.100s", _PATH_SSH_CLIENT_ID_RSA);
1352
1353 len = 2 + strlen(_PATH_SSH_CLIENT_ID_DSA) + 1;
1354 options->identity_files[options->num_identity_files] =
1355 xmalloc(len);
1356 snprintf(options->identity_files[options->num_identity_files++],
1357 len, "~/%.100s", _PATH_SSH_CLIENT_ID_DSA);
1358#ifdef OPENSSL_HAS_ECC 1367#ifdef OPENSSL_HAS_ECC
1359 len = 2 + strlen(_PATH_SSH_CLIENT_ID_ECDSA) + 1; 1368 add_identity_file(options, "~/",
1360 options->identity_files[options->num_identity_files] = 1369 _PATH_SSH_CLIENT_ID_ECDSA, 0);
1361 xmalloc(len);
1362 snprintf(options->identity_files[options->num_identity_files++],
1363 len, "~/%.100s", _PATH_SSH_CLIENT_ID_ECDSA);
1364#endif 1370#endif
1365 } 1371 }
1366 } 1372 }
diff --git a/readconf.h b/readconf.h
index c5cad9ccf..6ecbf281e 100644
--- a/readconf.h
+++ b/readconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.h,v 1.91 2011/09/23 07:45:05 markus Exp $ */ 1/* $OpenBSD: readconf.h,v 1.93 2013/02/22 04:45:09 dtucker Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -102,6 +102,7 @@ typedef struct {
102 102
103 int num_identity_files; /* Number of files for RSA/DSA identities. */ 103 int num_identity_files; /* Number of files for RSA/DSA identities. */
104 char *identity_files[SSH_MAX_IDENTITY_FILES]; 104 char *identity_files[SSH_MAX_IDENTITY_FILES];
105 int identity_file_userprovided[SSH_MAX_IDENTITY_FILES];
105 Key *identity_keys[SSH_MAX_IDENTITY_FILES]; 106 Key *identity_keys[SSH_MAX_IDENTITY_FILES];
106 107
107 /* Local TCP/IP forward requests. */ 108 /* Local TCP/IP forward requests. */
@@ -154,15 +155,20 @@ typedef struct {
154#define REQUEST_TTY_YES 2 155#define REQUEST_TTY_YES 2
155#define REQUEST_TTY_FORCE 3 156#define REQUEST_TTY_FORCE 3
156 157
158#define SSHCONF_CHECKPERM 1 /* check permissions on config file */
159#define SSHCONF_USERCONF 2 /* user provided config file not system */
160
157void initialize_options(Options *); 161void initialize_options(Options *);
158void fill_default_options(Options *); 162void fill_default_options(Options *);
159int read_config_file(const char *, const char *, Options *, int); 163int read_config_file(const char *, const char *, Options *, int);
160int parse_forward(Forward *, const char *, int, int); 164int parse_forward(Forward *, const char *, int, int);
161 165
162int 166int
163process_config_line(Options *, const char *, char *, const char *, int, int *); 167process_config_line(Options *, const char *, char *, const char *, int, int *,
168 int);
164 169
165void add_local_forward(Options *, const Forward *); 170void add_local_forward(Options *, const Forward *);
166void add_remote_forward(Options *, const Forward *); 171void add_remote_forward(Options *, const Forward *);
172void add_identity_file(Options *, const char *, const char *, int);
167 173
168#endif /* READCONF_H */ 174#endif /* READCONF_H */
diff --git a/ssh.c b/ssh.c
index 58c04f88f..19732cb4d 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.370 2012/07/06 01:47:38 djm Exp $ */ 1/* $OpenBSD: ssh.c,v 1.373 2013/02/22 22:09:01 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -405,12 +405,7 @@ main(int ac, char **av)
405 strerror(errno)); 405 strerror(errno));
406 break; 406 break;
407 } 407 }
408 if (options.num_identity_files >= 408 add_identity_file(&options, NULL, optarg, 1);
409 SSH_MAX_IDENTITY_FILES)
410 fatal("Too many identity files specified "
411 "(max %d)", SSH_MAX_IDENTITY_FILES);
412 options.identity_files[options.num_identity_files++] =
413 xstrdup(optarg);
414 break; 409 break;
415 case 'I': 410 case 'I':
416#ifdef ENABLE_PKCS11 411#ifdef ENABLE_PKCS11
@@ -584,7 +579,8 @@ main(int ac, char **av)
584 dummy = 1; 579 dummy = 1;
585 line = xstrdup(optarg); 580 line = xstrdup(optarg);
586 if (process_config_line(&options, host ? host : "", 581 if (process_config_line(&options, host ? host : "",
587 line, "command-line", 0, &dummy) != 0) 582 line, "command-line", 0, &dummy, SSHCONF_USERCONF)
583 != 0)
588 exit(255); 584 exit(255);
589 xfree(line); 585 xfree(line);
590 break; 586 break;
@@ -678,14 +674,15 @@ main(int ac, char **av)
678 * file if the user specifies a config file on the command line. 674 * file if the user specifies a config file on the command line.
679 */ 675 */
680 if (config != NULL) { 676 if (config != NULL) {
681 if (!read_config_file(config, host, &options, 0)) 677 if (!read_config_file(config, host, &options, SSHCONF_USERCONF))
682 fatal("Can't open user config file %.100s: " 678 fatal("Can't open user config file %.100s: "
683 "%.100s", config, strerror(errno)); 679 "%.100s", config, strerror(errno));
684 } else { 680 } else {
685 r = snprintf(buf, sizeof buf, "%s/%s", pw->pw_dir, 681 r = snprintf(buf, sizeof buf, "%s/%s", pw->pw_dir,
686 _PATH_SSH_USER_CONFFILE); 682 _PATH_SSH_USER_CONFFILE);
687 if (r > 0 && (size_t)r < sizeof(buf)) 683 if (r > 0 && (size_t)r < sizeof(buf))
688 (void)read_config_file(buf, host, &options, 1); 684 (void)read_config_file(buf, host, &options,
685 SSHCONF_CHECKPERM|SSHCONF_USERCONF);
689 686
690 /* Read systemwide configuration file after user config. */ 687 /* Read systemwide configuration file after user config. */
691 (void)read_config_file(_PATH_HOST_CONFIG_FILE, host, 688 (void)read_config_file(_PATH_HOST_CONFIG_FILE, host,
@@ -1539,7 +1536,8 @@ load_public_identity_files(void)
1539 fatal("load_public_identity_files: gethostname: %s", 1536 fatal("load_public_identity_files: gethostname: %s",
1540 strerror(errno)); 1537 strerror(errno));
1541 for (i = 0; i < options.num_identity_files; i++) { 1538 for (i = 0; i < options.num_identity_files; i++) {
1542 if (n_ids >= SSH_MAX_IDENTITY_FILES) { 1539 if (n_ids >= SSH_MAX_IDENTITY_FILES ||
1540 strcasecmp(options.identity_files[i], "none") == 0) {
1543 xfree(options.identity_files[i]); 1541 xfree(options.identity_files[i]);
1544 continue; 1542 continue;
1545 } 1543 }
diff --git a/sshconnect.c b/sshconnect.c
index ed0e78bfd..1fa1d5963 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.236 2012/09/14 16:51:34 markus Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.237 2013/02/22 19:13:56 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -89,6 +89,13 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
89 pid_t pid; 89 pid_t pid;
90 char *shell, strport[NI_MAXSERV]; 90 char *shell, strport[NI_MAXSERV];
91 91
92 if (!strcmp(proxy_command, "-")) {
93 packet_set_connection(STDIN_FILENO, STDOUT_FILENO);
94 packet_set_timeout(options.server_alive_interval,
95 options.server_alive_count_max);
96 return 0;
97 }
98
92 if ((shell = getenv("SHELL")) == NULL || *shell == '\0') 99 if ((shell = getenv("SHELL")) == NULL || *shell == '\0')
93 shell = _PATH_BSHELL; 100 shell = _PATH_BSHELL;
94 101
diff --git a/sshconnect2.c b/sshconnect2.c
index 378b3200c..77b02e3bf 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.191 2013/02/15 00:21:01 dtucker Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.192 2013/02/17 23:16:57 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -1502,7 +1502,7 @@ pubkey_prepare(Authctxt *authctxt)
1502 id = xcalloc(1, sizeof(*id)); 1502 id = xcalloc(1, sizeof(*id));
1503 id->key = key; 1503 id->key = key;
1504 id->filename = xstrdup(options.identity_files[i]); 1504 id->filename = xstrdup(options.identity_files[i]);
1505 id->userprovided = 1; 1505 id->userprovided = options.identity_file_userprovided[i];
1506 TAILQ_INSERT_TAIL(&files, id, next); 1506 TAILQ_INSERT_TAIL(&files, id, next);
1507 } 1507 }
1508 /* Prefer PKCS11 keys that are explicitly listed */ 1508 /* Prefer PKCS11 keys that are explicitly listed */
diff --git a/version.h b/version.h
index 82061d88a..f4f5a68c8 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
2 2
3#define SSH_VERSION "OpenSSH_6.2" 3#define SSH_VERSION "OpenSSH_6.2"
4 4
5#define SSH_PORTABLE "p1" 5#define SSH_PORTABLE "p2"
6#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE 6#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE
7#ifdef SSH_EXTRAVERSION 7#ifdef SSH_EXTRAVERSION
8#define SSH_RELEASE SSH_RELEASE_MINIMUM " " SSH_EXTRAVERSION 8#define SSH_RELEASE SSH_RELEASE_MINIMUM " " SSH_EXTRAVERSION