diff options
author | Damien Miller <djm@mindrot.org> | 2001-12-21 14:56:54 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-12-21 14:56:54 +1100 |
commit | 5a6b4fe22583394886092aad5787b5fa8355276e (patch) | |
tree | c6366cbaf2c3ea9bd1ac8f162f9452e1e9ca0434 /ssh.c | |
parent | f6681a3a96ae06d62db49594ba0dcf352f817801 (diff) |
- stevesk@cvs.openbsd.org 2001/12/19 17:16:13
[authfile.c bufaux.c bufaux.h buffer.c buffer.h packet.c packet.h ssh.c]
change the buffer/packet interface to use void* vs. char*; ok markus@
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: ssh.c,v 1.151 2001/12/19 07:18:56 deraadt Exp $"); | 42 | RCSID("$OpenBSD: ssh.c,v 1.152 2001/12/19 17:16:13 stevesk Exp $"); |
43 | 43 | ||
44 | #include <openssl/evp.h> | 44 | #include <openssl/evp.h> |
45 | #include <openssl/err.h> | 45 | #include <openssl/err.h> |
@@ -997,7 +997,7 @@ ssh_session(void) | |||
997 | int len = buffer_len(&command); | 997 | int len = buffer_len(&command); |
998 | if (len > 900) | 998 | if (len > 900) |
999 | len = 900; | 999 | len = 900; |
1000 | debug("Sending command: %.*s", len, buffer_ptr(&command)); | 1000 | debug("Sending command: %.*s", len, (u_char *)buffer_ptr(&command)); |
1001 | packet_start(SSH_CMSG_EXEC_CMD); | 1001 | packet_start(SSH_CMSG_EXEC_CMD); |
1002 | packet_put_string(buffer_ptr(&command), buffer_len(&command)); | 1002 | packet_put_string(buffer_ptr(&command), buffer_len(&command)); |
1003 | packet_send(); | 1003 | packet_send(); |
@@ -1026,7 +1026,7 @@ client_subsystem_reply(int type, int plen, void *ctxt) | |||
1026 | packet_done(); | 1026 | packet_done(); |
1027 | if (type == SSH2_MSG_CHANNEL_FAILURE) | 1027 | if (type == SSH2_MSG_CHANNEL_FAILURE) |
1028 | fatal("Request for subsystem '%.*s' failed on channel %d", | 1028 | fatal("Request for subsystem '%.*s' failed on channel %d", |
1029 | len, buffer_ptr(&command), id); | 1029 | len, (u_char *)buffer_ptr(&command), id); |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | /* request pty/x11/agent/tcpfwd/shell for channel */ | 1032 | /* request pty/x11/agent/tcpfwd/shell for channel */ |
@@ -1085,14 +1085,14 @@ ssh_session2_setup(int id, void *arg) | |||
1085 | if (len > 900) | 1085 | if (len > 900) |
1086 | len = 900; | 1086 | len = 900; |
1087 | if (subsystem_flag) { | 1087 | if (subsystem_flag) { |
1088 | debug("Sending subsystem: %.*s", len, buffer_ptr(&command)); | 1088 | debug("Sending subsystem: %.*s", len, (u_char *)buffer_ptr(&command)); |
1089 | channel_request_start(id, "subsystem", /*want reply*/ 1); | 1089 | channel_request_start(id, "subsystem", /*want reply*/ 1); |
1090 | /* register callback for reply */ | 1090 | /* register callback for reply */ |
1091 | /* XXX we asume that client_loop has already been called */ | 1091 | /* XXX we asume that client_loop has already been called */ |
1092 | dispatch_set(SSH2_MSG_CHANNEL_FAILURE, &client_subsystem_reply); | 1092 | dispatch_set(SSH2_MSG_CHANNEL_FAILURE, &client_subsystem_reply); |
1093 | dispatch_set(SSH2_MSG_CHANNEL_SUCCESS, &client_subsystem_reply); | 1093 | dispatch_set(SSH2_MSG_CHANNEL_SUCCESS, &client_subsystem_reply); |
1094 | } else { | 1094 | } else { |
1095 | debug("Sending command: %.*s", len, buffer_ptr(&command)); | 1095 | debug("Sending command: %.*s", len, (u_char *)buffer_ptr(&command)); |
1096 | channel_request_start(id, "exec", 0); | 1096 | channel_request_start(id, "exec", 0); |
1097 | } | 1097 | } |
1098 | packet_put_string(buffer_ptr(&command), buffer_len(&command)); | 1098 | packet_put_string(buffer_ptr(&command), buffer_len(&command)); |