summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2000-04-30 09:12:08 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2000-04-30 09:12:08 +0000
commit08b120f58a141eb212abb23bb9a6ef21ef6f4a85 (patch)
tree415526d5726770acb1978aa2bab192287feaf524
parented470f35a0923dcdfad767c943113140c74e2588 (diff)
send debug messages in SSH2 format
-rw-r--r--usr.bin/ssh/packet.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index f886d2c8429..bc052646ae7 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -17,7 +17,7 @@
*/
#include "includes.h"
-RCSID("$Id: packet.c,v 1.29 2000/04/14 10:30:32 markus Exp $");
+RCSID("$Id: packet.c,v 1.30 2000/04/30 09:12:07 markus Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -1093,8 +1093,15 @@ packet_send_debug(const char *fmt,...)
vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
- packet_start(SSH_MSG_DEBUG);
- packet_put_string(buf, strlen(buf));
+ if (compat20) {
+ packet_start(SSH2_MSG_DEBUG);
+ packet_put_char(0); /* bool: always display */
+ packet_put_cstring(buf);
+ packet_put_cstring("");
+ } else {
+ packet_start(SSH_MSG_DEBUG);
+ packet_put_cstring(buf);
+ }
packet_send();
packet_write_wait();
}