diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-03-05 06:52:57 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-03-05 06:52:57 +0000 |
commit | 4040fe10a9fb735bf75670522d11408ee654f74d (patch) | |
tree | 617770678c1374ae3b1c56ebe423ede7ab9db3f0 | |
parent | b22c2b86af40ed58621781f4ea0b3223542bcd80 (diff) |
- markus@cvs.openbsd.org 2001/03/01 22:46:37
[ssh.c]
don't truncate remote ssh-2 commands; from mkubita@securities.cz
use min, not max for logging, fixes overflow.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ssh.c | 7 |
2 files changed, 9 insertions, 4 deletions
@@ -106,6 +106,10 @@ | |||
106 | - deraadt@cvs.openbsd.org 2001/03/01 03:38:33 | 106 | - deraadt@cvs.openbsd.org 2001/03/01 03:38:33 |
107 | [cli.c cli.h rijndael.h ssh-keyscan.1] | 107 | [cli.c cli.h rijndael.h ssh-keyscan.1] |
108 | copyright notices on all source files | 108 | copyright notices on all source files |
109 | - markus@cvs.openbsd.org 2001/03/01 22:46:37 | ||
110 | [ssh.c] | ||
111 | don't truncate remote ssh-2 commands; from mkubita@securities.cz | ||
112 | use min, not max for logging, fixes overflow. | ||
109 | 113 | ||
110 | 20010304 | 114 | 20010304 |
111 | - (bal) Remove make-ssh-known-hosts.1 since it's no longer valid. | 115 | - (bal) Remove make-ssh-known-hosts.1 since it's no longer valid. |
@@ -4298,4 +4302,4 @@ | |||
4298 | - Wrote replacements for strlcpy and mkdtemp | 4302 | - Wrote replacements for strlcpy and mkdtemp |
4299 | - Released 1.0pre1 | 4303 | - Released 1.0pre1 |
4300 | 4304 | ||
4301 | $Id: ChangeLog,v 1.884 2001/03/05 06:50:47 mouring Exp $ | 4305 | $Id: ChangeLog,v 1.885 2001/03/05 06:52:57 mouring Exp $ |
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: ssh.c,v 1.99 2001/03/01 02:29:04 deraadt Exp $"); | 42 | RCSID("$OpenBSD: ssh.c,v 1.100 2001/03/01 22:46:37 markus Exp $"); |
43 | 43 | ||
44 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
45 | #include <openssl/err.h> | 45 | #include <openssl/err.h> |
@@ -936,7 +936,8 @@ client_subsystem_reply(int type, int plen, void *ctxt) | |||
936 | 936 | ||
937 | id = packet_get_int(); | 937 | id = packet_get_int(); |
938 | len = buffer_len(&command); | 938 | len = buffer_len(&command); |
939 | len = MAX(len, 900); | 939 | if (len > 900) |
940 | len = 900; | ||
940 | packet_done(); | 941 | packet_done(); |
941 | if (type == SSH2_MSG_CHANNEL_FAILURE) | 942 | if (type == SSH2_MSG_CHANNEL_FAILURE) |
942 | fatal("Request for subsystem '%.*s' failed on channel %d", | 943 | fatal("Request for subsystem '%.*s' failed on channel %d", |
@@ -1009,7 +1010,7 @@ ssh_session2_callback(int id, void *arg) | |||
1009 | debug("Sending command: %.*s", len, buffer_ptr(&command)); | 1010 | debug("Sending command: %.*s", len, buffer_ptr(&command)); |
1010 | channel_request_start(id, "exec", 0); | 1011 | channel_request_start(id, "exec", 0); |
1011 | } | 1012 | } |
1012 | packet_put_string(buffer_ptr(&command), len); | 1013 | packet_put_string(buffer_ptr(&command), buffer_len(&command)); |
1013 | packet_send(); | 1014 | packet_send(); |
1014 | } else { | 1015 | } else { |
1015 | channel_request(id, "shell", 0); | 1016 | channel_request(id, "shell", 0); |