summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-02-19 21:51:08 +1100
committerDamien Miller <djm@mindrot.org>2001-02-19 21:51:08 +1100
commit225736c73acf19a3319104fe54cd9ce595924134 (patch)
tree386798cff0e4232c5dc0958b5293f7fd7e625d8e
parentccdefb600f9d279cd17cdca79b241a036b380b21 (diff)
- 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
-rw-r--r--compat.c4
-rw-r--r--compat.h19
-rw-r--r--dispatch.c4
-rw-r--r--scp.c12
-rw-r--r--serverloop.c8
-rw-r--r--sftp.14
-rw-r--r--ssh.c9
-rw-r--r--version.h4
8 files changed, 36 insertions, 28 deletions
diff --git a/compat.c b/compat.c
index 83340993d..82f3df8c5 100644
--- a/compat.c
+++ b/compat.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: compat.c,v 1.34 2001/01/21 19:05:48 markus Exp $"); 26RCSID("$OpenBSD: compat.c,v 1.35 2001/02/19 09:53:31 markus Exp $");
27 27
28#ifdef HAVE_LIBPCRE 28#ifdef HAVE_LIBPCRE
29# include <pcreposix.h> 29# include <pcreposix.h>
@@ -86,6 +86,8 @@ compat_datafellows(const char *version)
86 { "^2\\.4$", SSH_OLD_SESSIONID}, /* Van Dyke */ 86 { "^2\\.4$", SSH_OLD_SESSIONID}, /* Van Dyke */
87 { "^3\\.0 SecureCRT", SSH_OLD_SESSIONID}, 87 { "^3\\.0 SecureCRT", SSH_OLD_SESSIONID},
88 { "^1\\.7 SecureFX", SSH_OLD_SESSIONID}, 88 { "^1\\.7 SecureFX", SSH_OLD_SESSIONID},
89 { "^1\\.2\\.1[89]", SSH_BUG_IGNOREMSG},
90 { "^1\\.2\\.2[012]", SSH_BUG_IGNOREMSG},
89 { NULL, 0 } 91 { NULL, 0 }
90 }; 92 };
91 /* process table, return first match */ 93 /* process table, return first match */
diff --git a/compat.h b/compat.h
index fb65cd6d6..2726fafff 100644
--- a/compat.h
+++ b/compat.h
@@ -21,7 +21,7 @@
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 23 */
24/* RCSID("$OpenBSD: compat.h,v 1.14 2001/01/08 22:29:05 markus Exp $"); */ 24/* RCSID("$OpenBSD: compat.h,v 1.15 2001/02/19 09:53:31 markus Exp $"); */
25 25
26#ifndef COMPAT_H 26#ifndef COMPAT_H
27#define COMPAT_H 27#define COMPAT_H
@@ -31,14 +31,15 @@
31#define SSH_PROTO_1_PREFERRED 0x02 31#define SSH_PROTO_1_PREFERRED 0x02
32#define SSH_PROTO_2 0x04 32#define SSH_PROTO_2 0x04
33 33
34#define SSH_BUG_SIGBLOB 0x01 34#define SSH_BUG_SIGBLOB 0x0001
35#define SSH_BUG_PKSERVICE 0x02 35#define SSH_BUG_PKSERVICE 0x0002
36#define SSH_BUG_HMAC 0x04 36#define SSH_BUG_HMAC 0x0004
37#define SSH_BUG_X11FWD 0x08 37#define SSH_BUG_X11FWD 0x0008
38#define SSH_OLD_SESSIONID 0x10 38#define SSH_OLD_SESSIONID 0x0010
39#define SSH_BUG_PKAUTH 0x20 39#define SSH_BUG_PKAUTH 0x0020
40#define SSH_BUG_DEBUG 0x40 40#define SSH_BUG_DEBUG 0x0040
41#define SSH_BUG_BANNER 0x80 41#define SSH_BUG_BANNER 0x0080
42#define SSH_BUG_IGNOREMSG 0x0100
42 43
43void enable_compat13(void); 44void enable_compat13(void);
44void enable_compat20(void); 45void enable_compat20(void);
diff --git a/dispatch.c b/dispatch.c
index f0437cdee..7168d1c74 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -22,7 +22,7 @@
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 23 */
24#include "includes.h" 24#include "includes.h"
25RCSID("$OpenBSD: dispatch.c,v 1.9 2001/02/04 15:32:23 stevesk Exp $"); 25RCSID("$OpenBSD: dispatch.c,v 1.10 2001/02/18 18:33:53 markus Exp $");
26 26
27#include "ssh1.h" 27#include "ssh1.h"
28#include "ssh2.h" 28#include "ssh2.h"
@@ -40,7 +40,7 @@ void
40dispatch_protocol_error(int type, int plen, void *ctxt) 40dispatch_protocol_error(int type, int plen, void *ctxt)
41{ 41{
42 error("Hm, dispatch protocol error: type %d plen %d", type, plen); 42 error("Hm, dispatch protocol error: type %d plen %d", type, plen);
43 if (compat20 && type == SSH2_MSG_KEXDH_INIT) 43 if (compat20 && type == SSH2_MSG_KEXINIT)
44 fatal("dispatch_protocol_error: rekeying is not supported"); 44 fatal("dispatch_protocol_error: rekeying is not supported");
45} 45}
46void 46void
diff --git a/scp.c b/scp.c
index 3ca110b16..541ba8726 100644
--- a/scp.c
+++ b/scp.c
@@ -75,7 +75,7 @@
75 */ 75 */
76 76
77#include "includes.h" 77#include "includes.h"
78RCSID("$OpenBSD: scp.c,v 1.58 2001/02/10 15:14:11 danh Exp $"); 78RCSID("$OpenBSD: scp.c,v 1.59 2001/02/19 10:36:25 deraadt Exp $");
79 79
80#include "xmalloc.h" 80#include "xmalloc.h"
81#include "atomicio.h" 81#include "atomicio.h"
@@ -802,16 +802,16 @@ sink(argc, argv)
802 } 802 }
803 vect[0] = xstrdup(np); 803 vect[0] = xstrdup(np);
804 sink(1, vect); 804 sink(1, vect);
805 if (vect[0])
806 xfree(vect[0]);
807 if (setimes) { 805 if (setimes) {
808 setimes = 0; 806 setimes = 0;
809 if (utimes(np, tv) < 0) 807 if (utimes(vect[0], tv) < 0)
810 run_err("%s: set times: %s", 808 run_err("%s: set times: %s",
811 np, strerror(errno)); 809 vect[0], strerror(errno));
812 } 810 }
813 if (mod_flag) 811 if (mod_flag)
814 (void) chmod(np, mode); 812 (void) chmod(vect[0], mode);
813 if (vect[0])
814 xfree(vect[0]);
815 continue; 815 continue;
816 } 816 }
817 omode = mode; 817 omode = mode;
diff --git a/serverloop.c b/serverloop.c
index 79dbe7909..fed943ffb 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: serverloop.c,v 1.49 2001/02/15 23:19:59 markus Exp $"); 38RCSID("$OpenBSD: serverloop.c,v 1.50 2001/02/19 09:53:32 markus Exp $");
39 39
40#include "xmalloc.h" 40#include "xmalloc.h"
41#include "packet.h" 41#include "packet.h"
@@ -70,6 +70,7 @@ static long fdout_bytes = 0; /* Number of stdout bytes read from program. */
70static int stdin_eof = 0; /* EOF message received from client. */ 70static int stdin_eof = 0; /* EOF message received from client. */
71static int fdout_eof = 0; /* EOF encountered reading from fdout. */ 71static int fdout_eof = 0; /* EOF encountered reading from fdout. */
72static int fderr_eof = 0; /* EOF encountered readung from fderr. */ 72static int fderr_eof = 0; /* EOF encountered readung from fderr. */
73static int fdin_is_tty = 0; /* fdin points to a tty. */
73static int connection_in; /* Connection to client (input). */ 74static int connection_in; /* Connection to client (input). */
74static int connection_out; /* Connection to client (output). */ 75static int connection_out; /* Connection to client (output). */
75static u_int buffer_high;/* "Soft" max buffer size. */ 76static u_int buffer_high;/* "Soft" max buffer size. */
@@ -338,7 +339,7 @@ process_output(fd_set * writeset)
338 fdin = -1; 339 fdin = -1;
339 } else { 340 } else {
340 /* Successful write. */ 341 /* Successful write. */
341 if (tcgetattr(fdin, &tio) == 0 && 342 if (fdin_is_tty && tcgetattr(fdin, &tio) == 0 &&
342 !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) { 343 !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) {
343 /* 344 /*
344 * Simulate echo to reduce the impact of 345 * 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)
435 if (fderr != -1) 436 if (fderr != -1)
436 set_nonblock(fderr); 437 set_nonblock(fderr);
437 438
439 if (!(datafellows & SSH_BUG_IGNOREMSG) && isatty(fdin))
440 fdin_is_tty = 1;
441
438 connection_in = packet_get_connection_in(); 442 connection_in = packet_get_connection_in();
439 connection_out = packet_get_connection_out(); 443 connection_out = packet_get_connection_out();
440 444
diff --git a/sftp.1 b/sftp.1
index 635c07b2e..6956ab4c4 100644
--- a/sftp.1
+++ b/sftp.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp.1,v 1.7 2001/02/14 09:46:03 djm Exp $ 1.\" $OpenBSD: sftp.1,v 1.8 2001/02/17 15:24:40 reinhard Exp $
2.\" 2.\"
3.\" Copyright (c) 2001 Damien Miller. All rights reserved. 3.\" Copyright (c) 2001 Damien Miller. All rights reserved.
4.\" 4.\"
@@ -27,7 +27,7 @@
27.Os 27.Os
28.Sh NAME 28.Sh NAME
29.Nm sftp 29.Nm sftp
30.Nd Secure file tranfer program 30.Nd Secure file transfer program
31.Sh SYNOPSIS 31.Sh SYNOPSIS
32.Nm sftp 32.Nm sftp
33.Op Fl vC 33.Op Fl vC
diff --git a/ssh.c b/ssh.c
index 1b022402d..9e5ca116f 100644
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: ssh.c,v 1.95 2001/02/11 12:59:25 markus Exp $"); 42RCSID("$OpenBSD: ssh.c,v 1.96 2001/02/17 23:28:58 deraadt Exp $");
43 43
44#include <openssl/evp.h> 44#include <openssl/evp.h>
45#include <openssl/err.h> 45#include <openssl/err.h>
@@ -391,11 +391,12 @@ main(int ac, char **av)
391 } 391 }
392 /* fallthrough */ 392 /* fallthrough */
393 case 'V': 393 case 'V':
394 fprintf(stderr, "SSH Version %s, protocol versions %d.%d/%d.%d.\n", 394 fprintf(stderr,
395 "%s, SSH protocols %d.%d/%d.%d, OpenSSL 0x%8.8lx\n",
395 SSH_VERSION, 396 SSH_VERSION,
396 PROTOCOL_MAJOR_1, PROTOCOL_MINOR_1, 397 PROTOCOL_MAJOR_1, PROTOCOL_MINOR_1,
397 PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2); 398 PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2,
398 fprintf(stderr, "Compiled with SSL (0x%8.8lx).\n", SSLeay()); 399 SSLeay());
399 if (opt == 'V') 400 if (opt == 'V')
400 exit(0); 401 exit(0);
401 break; 402 break;
diff --git a/version.h b/version.h
index 3de8c01e4..83e086c7d 100644
--- a/version.h
+++ b/version.h
@@ -1,3 +1,3 @@
1/* $OpenBSD: version.h,v 1.18 2001/02/16 14:26:57 markus Exp $ */ 1/* $OpenBSD: version.h,v 1.19 2001/02/19 10:35:23 markus Exp $ */
2 2
3#define SSH_VERSION "OpenSSH_2.5.0p1" 3#define SSH_VERSION "OpenSSH_2.5.1p1"