mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-01-03 08:12:05 +00:00
- OpenBSD CVS Sync:
- reinhard@cvs.openbsd.org 2001/02/17 08:24:40 [sftp.1] typo - deraadt@cvs.openbsd.org 2001/02/17 16:28:58 [ssh.c] cleanup -V output; noted by millert - deraadt@cvs.openbsd.org 2001/02/17 16:48:48 [sshd.8] it's the OpenSSH one - markus@cvs.openbsd.org 2001/02/18 11:33:54 [dispatch.c] typo, SSH2_MSG_KEXINIT, from aspa@kronodoc.fi - markus@cvs.openbsd.org 2001/02/19 02:53:32 [compat.c compat.h serverloop.c] ssh-1.2.{18-22} has broken handling of ignore messages; report from itojun@ - markus@cvs.openbsd.org 2001/02/19 03:35:23 [version.h] OpenSSH_2.5.1 adds bug compat with 1.2.{18-22} - deraadt@cvs.openbsd.org 2001/02/19 03:36:25 [scp.c] np is changed by recursion; vinschen@redhat.com
This commit is contained in:
parent
ccdefb600f
commit
225736c73a
4
compat.c
4
compat.c
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: compat.c,v 1.34 2001/01/21 19:05:48 markus Exp $");
|
RCSID("$OpenBSD: compat.c,v 1.35 2001/02/19 09:53:31 markus Exp $");
|
||||||
|
|
||||||
#ifdef HAVE_LIBPCRE
|
#ifdef HAVE_LIBPCRE
|
||||||
# include <pcreposix.h>
|
# include <pcreposix.h>
|
||||||
@ -86,6 +86,8 @@ compat_datafellows(const char *version)
|
|||||||
{ "^2\\.4$", SSH_OLD_SESSIONID}, /* Van Dyke */
|
{ "^2\\.4$", SSH_OLD_SESSIONID}, /* Van Dyke */
|
||||||
{ "^3\\.0 SecureCRT", SSH_OLD_SESSIONID},
|
{ "^3\\.0 SecureCRT", SSH_OLD_SESSIONID},
|
||||||
{ "^1\\.7 SecureFX", SSH_OLD_SESSIONID},
|
{ "^1\\.7 SecureFX", SSH_OLD_SESSIONID},
|
||||||
|
{ "^1\\.2\\.1[89]", SSH_BUG_IGNOREMSG},
|
||||||
|
{ "^1\\.2\\.2[012]", SSH_BUG_IGNOREMSG},
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
/* process table, return first match */
|
/* process table, return first match */
|
||||||
|
19
compat.h
19
compat.h
@ -21,7 +21,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
/* RCSID("$OpenBSD: compat.h,v 1.14 2001/01/08 22:29:05 markus Exp $"); */
|
/* RCSID("$OpenBSD: compat.h,v 1.15 2001/02/19 09:53:31 markus Exp $"); */
|
||||||
|
|
||||||
#ifndef COMPAT_H
|
#ifndef COMPAT_H
|
||||||
#define COMPAT_H
|
#define COMPAT_H
|
||||||
@ -31,14 +31,15 @@
|
|||||||
#define SSH_PROTO_1_PREFERRED 0x02
|
#define SSH_PROTO_1_PREFERRED 0x02
|
||||||
#define SSH_PROTO_2 0x04
|
#define SSH_PROTO_2 0x04
|
||||||
|
|
||||||
#define SSH_BUG_SIGBLOB 0x01
|
#define SSH_BUG_SIGBLOB 0x0001
|
||||||
#define SSH_BUG_PKSERVICE 0x02
|
#define SSH_BUG_PKSERVICE 0x0002
|
||||||
#define SSH_BUG_HMAC 0x04
|
#define SSH_BUG_HMAC 0x0004
|
||||||
#define SSH_BUG_X11FWD 0x08
|
#define SSH_BUG_X11FWD 0x0008
|
||||||
#define SSH_OLD_SESSIONID 0x10
|
#define SSH_OLD_SESSIONID 0x0010
|
||||||
#define SSH_BUG_PKAUTH 0x20
|
#define SSH_BUG_PKAUTH 0x0020
|
||||||
#define SSH_BUG_DEBUG 0x40
|
#define SSH_BUG_DEBUG 0x0040
|
||||||
#define SSH_BUG_BANNER 0x80
|
#define SSH_BUG_BANNER 0x0080
|
||||||
|
#define SSH_BUG_IGNOREMSG 0x0100
|
||||||
|
|
||||||
void enable_compat13(void);
|
void enable_compat13(void);
|
||||||
void enable_compat20(void);
|
void enable_compat20(void);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: dispatch.c,v 1.9 2001/02/04 15:32:23 stevesk Exp $");
|
RCSID("$OpenBSD: dispatch.c,v 1.10 2001/02/18 18:33:53 markus Exp $");
|
||||||
|
|
||||||
#include "ssh1.h"
|
#include "ssh1.h"
|
||||||
#include "ssh2.h"
|
#include "ssh2.h"
|
||||||
@ -40,7 +40,7 @@ void
|
|||||||
dispatch_protocol_error(int type, int plen, void *ctxt)
|
dispatch_protocol_error(int type, int plen, void *ctxt)
|
||||||
{
|
{
|
||||||
error("Hm, dispatch protocol error: type %d plen %d", type, plen);
|
error("Hm, dispatch protocol error: type %d plen %d", type, plen);
|
||||||
if (compat20 && type == SSH2_MSG_KEXDH_INIT)
|
if (compat20 && type == SSH2_MSG_KEXINIT)
|
||||||
fatal("dispatch_protocol_error: rekeying is not supported");
|
fatal("dispatch_protocol_error: rekeying is not supported");
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
|
12
scp.c
12
scp.c
@ -75,7 +75,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: scp.c,v 1.58 2001/02/10 15:14:11 danh Exp $");
|
RCSID("$OpenBSD: scp.c,v 1.59 2001/02/19 10:36:25 deraadt Exp $");
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "atomicio.h"
|
#include "atomicio.h"
|
||||||
@ -802,16 +802,16 @@ sink(argc, argv)
|
|||||||
}
|
}
|
||||||
vect[0] = xstrdup(np);
|
vect[0] = xstrdup(np);
|
||||||
sink(1, vect);
|
sink(1, vect);
|
||||||
if (vect[0])
|
|
||||||
xfree(vect[0]);
|
|
||||||
if (setimes) {
|
if (setimes) {
|
||||||
setimes = 0;
|
setimes = 0;
|
||||||
if (utimes(np, tv) < 0)
|
if (utimes(vect[0], tv) < 0)
|
||||||
run_err("%s: set times: %s",
|
run_err("%s: set times: %s",
|
||||||
np, strerror(errno));
|
vect[0], strerror(errno));
|
||||||
}
|
}
|
||||||
if (mod_flag)
|
if (mod_flag)
|
||||||
(void) chmod(np, mode);
|
(void) chmod(vect[0], mode);
|
||||||
|
if (vect[0])
|
||||||
|
xfree(vect[0]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
omode = mode;
|
omode = mode;
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: serverloop.c,v 1.49 2001/02/15 23:19:59 markus Exp $");
|
RCSID("$OpenBSD: serverloop.c,v 1.50 2001/02/19 09:53:32 markus Exp $");
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
@ -70,6 +70,7 @@ static long fdout_bytes = 0; /* Number of stdout bytes read from program. */
|
|||||||
static int stdin_eof = 0; /* EOF message received from client. */
|
static int stdin_eof = 0; /* EOF message received from client. */
|
||||||
static int fdout_eof = 0; /* EOF encountered reading from fdout. */
|
static int fdout_eof = 0; /* EOF encountered reading from fdout. */
|
||||||
static int fderr_eof = 0; /* EOF encountered readung from fderr. */
|
static int fderr_eof = 0; /* EOF encountered readung from fderr. */
|
||||||
|
static int fdin_is_tty = 0; /* fdin points to a tty. */
|
||||||
static int connection_in; /* Connection to client (input). */
|
static int connection_in; /* Connection to client (input). */
|
||||||
static int connection_out; /* Connection to client (output). */
|
static int connection_out; /* Connection to client (output). */
|
||||||
static u_int buffer_high;/* "Soft" max buffer size. */
|
static u_int buffer_high;/* "Soft" max buffer size. */
|
||||||
@ -338,7 +339,7 @@ process_output(fd_set * writeset)
|
|||||||
fdin = -1;
|
fdin = -1;
|
||||||
} else {
|
} else {
|
||||||
/* Successful write. */
|
/* Successful write. */
|
||||||
if (tcgetattr(fdin, &tio) == 0 &&
|
if (fdin_is_tty && tcgetattr(fdin, &tio) == 0 &&
|
||||||
!(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) {
|
!(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) {
|
||||||
/*
|
/*
|
||||||
* Simulate echo to reduce the impact of
|
* Simulate echo to reduce the impact of
|
||||||
@ -435,6 +436,9 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
|
|||||||
if (fderr != -1)
|
if (fderr != -1)
|
||||||
set_nonblock(fderr);
|
set_nonblock(fderr);
|
||||||
|
|
||||||
|
if (!(datafellows & SSH_BUG_IGNOREMSG) && isatty(fdin))
|
||||||
|
fdin_is_tty = 1;
|
||||||
|
|
||||||
connection_in = packet_get_connection_in();
|
connection_in = packet_get_connection_in();
|
||||||
connection_out = packet_get_connection_out();
|
connection_out = packet_get_connection_out();
|
||||||
|
|
||||||
|
4
sftp.1
4
sftp.1
@ -1,4 +1,4 @@
|
|||||||
.\" $OpenBSD: sftp.1,v 1.7 2001/02/14 09:46:03 djm Exp $
|
.\" $OpenBSD: sftp.1,v 1.8 2001/02/17 15:24:40 reinhard Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2001 Damien Miller. All rights reserved.
|
.\" Copyright (c) 2001 Damien Miller. All rights reserved.
|
||||||
.\"
|
.\"
|
||||||
@ -27,7 +27,7 @@
|
|||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
.Nm sftp
|
.Nm sftp
|
||||||
.Nd Secure file tranfer program
|
.Nd Secure file transfer program
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm sftp
|
.Nm sftp
|
||||||
.Op Fl vC
|
.Op Fl vC
|
||||||
|
9
ssh.c
9
ssh.c
@ -39,7 +39,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: ssh.c,v 1.95 2001/02/11 12:59:25 markus Exp $");
|
RCSID("$OpenBSD: ssh.c,v 1.96 2001/02/17 23:28:58 deraadt Exp $");
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
@ -391,11 +391,12 @@ main(int ac, char **av)
|
|||||||
}
|
}
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
case 'V':
|
case 'V':
|
||||||
fprintf(stderr, "SSH Version %s, protocol versions %d.%d/%d.%d.\n",
|
fprintf(stderr,
|
||||||
|
"%s, SSH protocols %d.%d/%d.%d, OpenSSL 0x%8.8lx\n",
|
||||||
SSH_VERSION,
|
SSH_VERSION,
|
||||||
PROTOCOL_MAJOR_1, PROTOCOL_MINOR_1,
|
PROTOCOL_MAJOR_1, PROTOCOL_MINOR_1,
|
||||||
PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2);
|
PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2,
|
||||||
fprintf(stderr, "Compiled with SSL (0x%8.8lx).\n", SSLeay());
|
SSLeay());
|
||||||
if (opt == 'V')
|
if (opt == 'V')
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user