Compare commits

...
12 Commits
Author SHA1 Message Date
Darren Tucker 37885e4b5e - (dtucker) [myproposal.h] Do not advertise AES GSM ciphers if we don't have
the required OpenSSL support.  Patch from naddy at freebsd.
2013-06-11 11:47:40 +10:00
Damien Miller b396fa3130 - (djm) Release 6.2p2 2013-05-16 11:33:40 +10:00
Damien Miller b6a63d7239 - (djm) [contrib/ssh-copy-id] Fix bug that could cause "rm *" to be
executed if mktemp failed; bz#2105 ok dtucker@
2013-05-16 11:09:43 +10:00
Damien Miller 0bb4a4d24a - (djm) [README] Update release notes URL 2013-05-10 16:12:54 +10:00
Damien Miller 5b02bf624e - (djm) [version.h contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
[contrib/suse/openssh.spec] Crank version numbers for release.
2013-05-10 16:02:20 +10:00
Damien Miller f1d2496aac - [email protected] 2013/04/11 02:27:50
[packet.c]
     quiet disconnect notifications on the server from error() back to logit()
     if it is a normal client closure; bz#2057 ok+feedback dtucker@
2013-05-10 13:41:33 +10:00
Darren Tucker 31859a046f - [email protected] 2013/02/22 22:09:01
[ssh.c]
     Allow IdenityFile=none; ok markus deraadt (and dtucker for an earlier
     version)
2013-04-05 11:22:35 +11:00
Darren Tucker 0059933c8d - [email protected] 2013/02/22 19:13:56
[sshconnect.c]
     support ProxyCommand=- (stdin/out already point to the proxy); ok djm@
2013-04-05 11:20:18 +11:00
Darren Tucker 81a05803d6 - [email protected] 2013/02/22 04:45:09
[ssh.c readconf.c readconf.h]
     Don't complain if IdentityFiles specified in system-wide configs are
     missing.  ok djm, deraadt
2013-04-05 11:18:57 +11:00
Darren Tucker 6628dba7dd - [email protected] 2013/02/19 02:12:47
[krl.c]
     Remove bogus include.  ok djm
(id sync only)
2013-04-05 11:17:08 +11:00
Darren Tucker 2b3a03ea3f - [email protected] 2013/02/17 23:16:57
[readconf.c ssh.c readconf.h sshconnect2.c]
     Keep track of which IndentityFile options were manually supplied and which
     were default options, and don't warn if the latter are missing.
     ok markus@
2013-04-05 11:13:30 +11:00
Darren Tucker 2fefe03473 - (dtucker) [openbsd-compat/bsd-cygwin_util.{c,h}] Don't include windows.h
to avoid conflicting definitions of __int64, adding the required bits.
   Patch from Corinna Vinschen.

(pulled from HEAD but kept the ChangeLog date as it was)
2013-04-05 10:53:30 +11:00
16 changed files with 134 additions and 64 deletions
+41 -6
View File
@@ -1,18 +1,53 @@
20130610
- (dtucker) [myproposal.h] Do not advertise AES GSM ciphers if we don't have
the required OpenSSL support. Patch from naddy at freebsd.
20130516
- (djm) [contrib/ssh-copy-id] Fix bug that could cause "rm *" to be
executed if mktemp failed; bz#2105 ok dtucker@
- (djm) Release 6.2p2
20130510
- (djm) OpenBSD CVS Cherrypick
- [email protected] 2013/04/11 02:27:50
[packet.c]
quiet disconnect notifications on the server from error() back to logit()
if it is a normal client closure; bz#2057 ok+feedback dtucker@
- (djm) [version.h contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
[contrib/suse/openssh.spec] Crank version numbers for release.
- (djm) [README] Update release notes URL
20130404
- (dtucker) OpenBSD CVS Sync
- [email protected] 2013/02/17 23:16:57
[readconf.c ssh.c readconf.h sshconnect2.c]
Keep track of which IndentityFile options were manually supplied and which
were default options, and don't warn if the latter are missing.
ok markus@
- [email protected] 2013/02/19 02:12:47
[krl.c]
Remove bogus include. ok djm
- [email protected] 2013/02/22 04:45:09
[ssh.c readconf.c readconf.h]
Don't complain if IdentityFiles specified in system-wide configs are
missing. ok djm, deraadt.
- [email protected] 2013/02/22 19:13:56
[sshconnect.c]
support ProxyCommand=- (stdin/out already point to the proxy); ok djm@
- [email protected] 2013/02/22 22:09:01
[ssh.c]
Allow IdenityFile=none; ok markus deraadt (and dtucker for an earlier
version)
20130401
- (dtucker) [openbsd-compat/bsd-cygwin_util.{c,h}] Don't include windows.h
to avoid conflicting definitions of __int64, adding the required bits.
Patch from Corinna Vinschen.
20120323
- (tim) [Makefile.in] remove some duplication introduced in 20130220 commit.
20120322
- (djm) [contrib/ssh-copy-id contrib/ssh-copy-id.1] Updated to Phil
Hands' greatly revised version.
- (djm) Release 6.2p1
- (dtucker) [configure.ac] Add stdlib.h to zlib check for exit() prototype.
- (dtucker) [includes.h] Check if _GNU_SOURCE is already defined before
defining it again. Prevents warnings if someone, eg, sets it in CFLAGS.
20120318
- (djm) [configure.ac log.c scp.c sshconnect2.c openbsd-compat/vis.c]
+2 -2
View File
@@ -1,4 +1,4 @@
See http://www.openssh.com/txt/release-6.2 for the release notes.
See http://www.openssh.com/txt/release-6.2p2 for the release notes.
- A Japanese translation of this document and of the OpenSSH FAQ is
- available at http://www.unixuser.org/~haruyama/security/openssh/index.html
@@ -62,4 +62,4 @@ References -
[6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9
[7] http://www.openssh.com/faq.html
$Id: README,v 1.82 2013/02/26 23:48:19 djm Exp $
$Id: README,v 1.82.2.1 2013/05/10 06:12:54 djm Exp $
+2 -2
View File
@@ -16,7 +16,7 @@
#old cvs stuff. please update before use. may be deprecated.
%define use_stable 1
%define version 6.2p1
%define version 6.2p2
%if %{use_stable}
%define cvs %{nil}
%define release 1
@@ -363,4 +363,4 @@ fi
* Mon Jan 01 1998 ...
Template Version: 1.31
$Id: openssh.spec,v 1.79 2013/02/26 23:48:20 djm Exp $
$Id: openssh.spec,v 1.79.2.1 2013/05/10 06:02:21 djm Exp $
+1 -1
View File
@@ -1,4 +1,4 @@
%define ver 6.2p1
%define ver 6.2p2
%define rel 1
# OpenSSH privilege separation requires a user & group ID
+8 -1
View File
@@ -165,6 +165,9 @@ done
eval set -- "$SAVEARGS"
if [ $# == 0 ] ; then
usage
fi
if [ $# != 1 ] ; then
printf '%s: ERROR: Too many arguments. Expecting a target hostname, got: %s\n\n' "$0" "$SAVEARGS" >&2
usage
@@ -196,7 +199,11 @@ populate_new_ids() {
umask 0177
local L_TMP_ID_FILE=$(mktemp ~/.ssh/ssh-copy-id_id.XXXXXXXXXX)
trap "rm -f $L_TMP_ID_FILE*" EXIT TERM INT QUIT
if test $? -ne 0 || test "x$L_TMP_ID_FILE" = "x" ; then
echo "mktemp failed" 1>&2
exit 1
fi
trap "rm -f $L_TMP_ID_FILE ${L_TMP_ID_FILE}.pub" EXIT TERM INT QUIT
printf '%s: INFO: attempting to log in with the new key(s), to filter out any that are already installed\n' "$0" >&2
NEW_IDS=$(
eval $GET_ID | {
+1 -1
View File
@@ -13,7 +13,7 @@
Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
Name: openssh
Version: 6.2p1
Version: 6.2p2
URL: http://www.openssh.com/
Release: 1
Source0: openssh-%{version}.tar.gz
+1 -1
View File
@@ -14,7 +14,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $OpenBSD: krl.c,v 1.9 2013/01/27 10:06:12 djm Exp $ */
/* $OpenBSD: krl.c,v 1.10 2013/02/19 02:12:47 dtucker Exp $ */
#include "includes.h"
+8 -1
View File
@@ -45,6 +45,13 @@
# define HOSTKEY_ECDSA_METHODS
#endif
#ifdef OPENSSL_HAVE_EVPGCM
# define AESGCM_CIPHER_MODES \
"[email protected],[email protected],"
#else
# define AESGCM_CIPHER_MODES
#endif
/* Old OpenSSL doesn't support what we need for DHGEX-sha256 */
#if OPENSSL_VERSION_NUMBER >= 0x00907000L
# define KEX_SHA256_METHODS \
@@ -73,7 +80,7 @@
#define KEX_DEFAULT_ENCRYPT \
"aes128-ctr,aes192-ctr,aes256-ctr," \
"arcfour256,arcfour128," \
"[email protected],[email protected]," \
AESGCM_CIPHER_MODES \
"aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \
"aes192-cbc,aes256-cbc,arcfour,[email protected]"
#ifdef HAVE_EVP_SHA256
+1 -1
View File
@@ -1,4 +1,4 @@
/* $Id: bsd-cygwin_util.h,v 1.16 2013/04/01 01:40:49 dtucker Exp $ */
/* $Id: bsd-cygwin_util.h,v 1.15.4.1 2013/04/04 23:53:31 dtucker Exp $ */
/*
* Copyright (c) 2000, 2001, 2011, 2013 Corinna Vinschen <vinschen@redhat.com>
+6 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: packet.c,v 1.181 2013/02/10 23:35:24 djm Exp $ */
/* $OpenBSD: packet.c,v 1.182 2013/04/11 02:27:50 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1460,7 +1460,11 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
case SSH2_MSG_DISCONNECT:
reason = packet_get_int();
msg = packet_get_string(NULL);
error("Received disconnect from %s: %u: %.400s",
/* Ignore normal client exit notifications */
do_log2(active_state->server_side &&
reason == SSH2_DISCONNECT_BY_APPLICATION ?
SYSLOG_LEVEL_INFO : SYSLOG_LEVEL_ERROR,
"Received disconnect from %s: %u: %.400s",
get_remote_ipaddr(), reason, msg);
xfree(msg);
cleanup_exit(255);
+35 -29
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: readconf.c,v 1.194 2011/09/23 07:45:05 markus Exp $ */
/* $OpenBSD: readconf.c,v 1.196 2013/02/22 04:45:08 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -326,6 +326,26 @@ clear_forwardings(Options *options)
options->tun_open = SSH_TUNMODE_NO;
}
void
add_identity_file(Options *options, const char *dir, const char *filename,
int userprovided)
{
char *path;
if (options->num_identity_files >= SSH_MAX_IDENTITY_FILES)
fatal("Too many identity files specified (max %d)",
SSH_MAX_IDENTITY_FILES);
if (dir == NULL) /* no dir, filename is absolute */
path = xstrdup(filename);
else
(void)xasprintf(&path, "%.100s%.100s", dir, filename);
options->identity_file_userprovided[options->num_identity_files] =
userprovided;
options->identity_files[options->num_identity_files++] = path;
}
/*
* Returns the number of the token pointed to by cp or oBadOption.
*/
@@ -353,7 +373,7 @@ parse_token(const char *cp, const char *filename, int linenum)
int
process_config_line(Options *options, const char *host,
char *line, const char *filename, int linenum,
int *activep)
int *activep, int userconfig)
{
char *s, **charptr, *endofnumber, *keyword, *arg, *arg2;
char **cpptr, fwdarg[256];
@@ -586,9 +606,7 @@ parse_yesnoask:
if (*intptr >= SSH_MAX_IDENTITY_FILES)
fatal("%.200s line %d: Too many identity files specified (max %d).",
filename, linenum, SSH_MAX_IDENTITY_FILES);
charptr = &options->identity_files[*intptr];
*charptr = xstrdup(arg);
*intptr = *intptr + 1;
add_identity_file(options, NULL, arg, userconfig);
}
break;
@@ -1075,7 +1093,7 @@ parse_int:
int
read_config_file(const char *filename, const char *host, Options *options,
int checkperm)
int flags)
{
FILE *f;
char line[1024];
@@ -1085,7 +1103,7 @@ read_config_file(const char *filename, const char *host, Options *options,
if ((f = fopen(filename, "r")) == NULL)
return 0;
if (checkperm) {
if (flags & SSHCONF_CHECKPERM) {
struct stat sb;
if (fstat(fileno(f), &sb) == -1)
@@ -1106,7 +1124,8 @@ read_config_file(const char *filename, const char *host, Options *options,
while (fgets(line, sizeof(line), f)) {
/* Update line number counter. */
linenum++;
if (process_config_line(options, host, line, filename, linenum, &active) != 0)
if (process_config_line(options, host, line, filename, linenum,
&active, flags & SSHCONF_USERCONF) != 0)
bad_options++;
}
fclose(f);
@@ -1280,30 +1299,17 @@ fill_default_options(Options * options)
options->protocol = SSH_PROTO_2;
if (options->num_identity_files == 0) {
if (options->protocol & SSH_PROTO_1) {
len = 2 + strlen(_PATH_SSH_CLIENT_IDENTITY) + 1;
options->identity_files[options->num_identity_files] =
xmalloc(len);
snprintf(options->identity_files[options->num_identity_files++],
len, "~/%.100s", _PATH_SSH_CLIENT_IDENTITY);
add_identity_file(options, "~/",
_PATH_SSH_CLIENT_IDENTITY, 0);
}
if (options->protocol & SSH_PROTO_2) {
len = 2 + strlen(_PATH_SSH_CLIENT_ID_RSA) + 1;
options->identity_files[options->num_identity_files] =
xmalloc(len);
snprintf(options->identity_files[options->num_identity_files++],
len, "~/%.100s", _PATH_SSH_CLIENT_ID_RSA);
len = 2 + strlen(_PATH_SSH_CLIENT_ID_DSA) + 1;
options->identity_files[options->num_identity_files] =
xmalloc(len);
snprintf(options->identity_files[options->num_identity_files++],
len, "~/%.100s", _PATH_SSH_CLIENT_ID_DSA);
add_identity_file(options, "~/",
_PATH_SSH_CLIENT_ID_RSA, 0);
add_identity_file(options, "~/",
_PATH_SSH_CLIENT_ID_DSA, 0);
#ifdef OPENSSL_HAS_ECC
len = 2 + strlen(_PATH_SSH_CLIENT_ID_ECDSA) + 1;
options->identity_files[options->num_identity_files] =
xmalloc(len);
snprintf(options->identity_files[options->num_identity_files++],
len, "~/%.100s", _PATH_SSH_CLIENT_ID_ECDSA);
add_identity_file(options, "~/",
_PATH_SSH_CLIENT_ID_ECDSA, 0);
#endif
}
}
+8 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: readconf.h,v 1.91 2011/09/23 07:45:05 markus Exp $ */
/* $OpenBSD: readconf.h,v 1.93 2013/02/22 04:45:09 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -96,6 +96,7 @@ typedef struct {
int num_identity_files; /* Number of files for RSA/DSA identities. */
char *identity_files[SSH_MAX_IDENTITY_FILES];
int identity_file_userprovided[SSH_MAX_IDENTITY_FILES];
Key *identity_keys[SSH_MAX_IDENTITY_FILES];
/* Local TCP/IP forward requests. */
@@ -148,15 +149,20 @@ typedef struct {
#define REQUEST_TTY_YES 2
#define REQUEST_TTY_FORCE 3
#define SSHCONF_CHECKPERM 1 /* check permissions on config file */
#define SSHCONF_USERCONF 2 /* user provided config file not system */
void initialize_options(Options *);
void fill_default_options(Options *);
int read_config_file(const char *, const char *, Options *, int);
int parse_forward(Forward *, const char *, int, int);
int
process_config_line(Options *, const char *, char *, const char *, int, int *);
process_config_line(Options *, const char *, char *, const char *, int, int *,
int);
void add_local_forward(Options *, const Forward *);
void add_remote_forward(Options *, const Forward *);
void add_identity_file(Options *, const char *, const char *, int);
#endif /* READCONF_H */
+9 -11
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: ssh.c,v 1.370 2012/07/06 01:47:38 djm Exp $ */
/* $OpenBSD: ssh.c,v 1.373 2013/02/22 22:09:01 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -405,12 +405,7 @@ main(int ac, char **av)
strerror(errno));
break;
}
if (options.num_identity_files >=
SSH_MAX_IDENTITY_FILES)
fatal("Too many identity files specified "
"(max %d)", SSH_MAX_IDENTITY_FILES);
options.identity_files[options.num_identity_files++] =
xstrdup(optarg);
add_identity_file(&options, NULL, optarg, 1);
break;
case 'I':
#ifdef ENABLE_PKCS11
@@ -584,7 +579,8 @@ main(int ac, char **av)
dummy = 1;
line = xstrdup(optarg);
if (process_config_line(&options, host ? host : "",
line, "command-line", 0, &dummy) != 0)
line, "command-line", 0, &dummy, SSHCONF_USERCONF)
!= 0)
exit(255);
xfree(line);
break;
@@ -678,14 +674,15 @@ main(int ac, char **av)
* file if the user specifies a config file on the command line.
*/
if (config != NULL) {
if (!read_config_file(config, host, &options, 0))
if (!read_config_file(config, host, &options, SSHCONF_USERCONF))
fatal("Can't open user config file %.100s: "
"%.100s", config, strerror(errno));
} else {
r = snprintf(buf, sizeof buf, "%s/%s", pw->pw_dir,
_PATH_SSH_USER_CONFFILE);
if (r > 0 && (size_t)r < sizeof(buf))
(void)read_config_file(buf, host, &options, 1);
(void)read_config_file(buf, host, &options,
SSHCONF_CHECKPERM|SSHCONF_USERCONF);
/* Read systemwide configuration file after user config. */
(void)read_config_file(_PATH_HOST_CONFIG_FILE, host,
@@ -1539,7 +1536,8 @@ load_public_identity_files(void)
fatal("load_public_identity_files: gethostname: %s",
strerror(errno));
for (i = 0; i < options.num_identity_files; i++) {
if (n_ids >= SSH_MAX_IDENTITY_FILES) {
if (n_ids >= SSH_MAX_IDENTITY_FILES ||
strcasecmp(options.identity_files[i], "none") == 0) {
xfree(options.identity_files[i]);
continue;
}
+8 -1
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: sshconnect.c,v 1.236 2012/09/14 16:51:34 markus Exp $ */
/* $OpenBSD: sshconnect.c,v 1.237 2013/02/22 19:13:56 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* 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)
pid_t pid;
char *shell, strport[NI_MAXSERV];
if (!strcmp(proxy_command, "-")) {
packet_set_connection(STDIN_FILENO, STDOUT_FILENO);
packet_set_timeout(options.server_alive_interval,
options.server_alive_count_max);
return 0;
}
if ((shell = getenv("SHELL")) == NULL || *shell == '\0')
shell = _PATH_BSHELL;
+2 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: sshconnect2.c,v 1.191 2013/02/15 00:21:01 dtucker Exp $ */
/* $OpenBSD: sshconnect2.c,v 1.192 2013/02/17 23:16:57 dtucker Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -1384,7 +1384,7 @@ pubkey_prepare(Authctxt *authctxt)
id = xcalloc(1, sizeof(*id));
id->key = key;
id->filename = xstrdup(options.identity_files[i]);
id->userprovided = 1;
id->userprovided = options.identity_file_userprovided[i];
TAILQ_INSERT_TAIL(&files, id, next);
}
/* Prefer PKCS11 keys that are explicitly listed */
+1 -1
View File
@@ -2,5 +2,5 @@
#define SSH_VERSION "OpenSSH_6.2"
#define SSH_PORTABLE "p1"
#define SSH_PORTABLE "p2"
#define SSH_RELEASE SSH_VERSION SSH_PORTABLE