summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/ssh/msg.c20
-rw-r--r--usr.bin/ssh/msg.h6
-rw-r--r--usr.bin/ssh/ssh-keysign.c8
-rw-r--r--usr.bin/ssh/sshconnect2.c6
4 files changed, 20 insertions, 20 deletions
diff --git a/usr.bin/ssh/msg.c b/usr.bin/ssh/msg.c
index de19b057f92..5d266c207e5 100644
--- a/usr.bin/ssh/msg.c
+++ b/usr.bin/ssh/msg.c
@@ -22,7 +22,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "includes.h"
-RCSID("$OpenBSD: msg.c,v 1.4 2002/07/01 16:15:25 deraadt Exp $");
+RCSID("$OpenBSD: msg.c,v 1.5 2002/12/19 00:07:02 djm Exp $");
#include "buffer.h"
#include "getput.h"
@@ -31,43 +31,43 @@ RCSID("$OpenBSD: msg.c,v 1.4 2002/07/01 16:15:25 deraadt Exp $");
#include "msg.h"
void
-msg_send(int fd, u_char type, Buffer *m)
+ssh_msg_send(int fd, u_char type, Buffer *m)
{
u_char buf[5];
u_int mlen = buffer_len(m);
- debug3("msg_send: type %u", (unsigned int)type & 0xff);
+ debug3("ssh_msg_send: type %u", (unsigned int)type & 0xff);
PUT_32BIT(buf, mlen + 1);
buf[4] = type; /* 1st byte of payload is mesg-type */
if (atomicio(write, fd, buf, sizeof(buf)) != sizeof(buf))
- fatal("msg_send: write");
+ fatal("ssh_msg_send: write");
if (atomicio(write, fd, buffer_ptr(m), mlen) != mlen)
- fatal("msg_send: write");
+ fatal("ssh_msg_send: write");
}
int
-msg_recv(int fd, Buffer *m)
+ssh_msg_recv(int fd, Buffer *m)
{
u_char buf[4];
ssize_t res;
u_int msg_len;
- debug3("msg_recv entering");
+ debug3("ssh_msg_recv entering");
res = atomicio(read, fd, buf, sizeof(buf));
if (res != sizeof(buf)) {
if (res == 0)
return -1;
- fatal("msg_recv: read: header %ld", (long)res);
+ fatal("ssh_msg_recv: read: header %ld", (long)res);
}
msg_len = GET_32BIT(buf);
if (msg_len > 256 * 1024)
- fatal("msg_recv: read: bad msg_len %u", msg_len);
+ fatal("ssh_msg_recv: read: bad msg_len %u", msg_len);
buffer_clear(m);
buffer_append_space(m, msg_len);
res = atomicio(read, fd, buffer_ptr(m), msg_len);
if (res != msg_len)
- fatal("msg_recv: read: %ld != msg_len", (long)res);
+ fatal("ssh_msg_recv: read: %ld != msg_len", (long)res);
return 0;
}
diff --git a/usr.bin/ssh/msg.h b/usr.bin/ssh/msg.h
index 13fa95b27eb..c07df88a7ac 100644
--- a/usr.bin/ssh/msg.h
+++ b/usr.bin/ssh/msg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: msg.h,v 1.1 2002/05/23 19:24:30 markus Exp $ */
+/* $OpenBSD: msg.h,v 1.2 2002/12/19 00:07:02 djm Exp $ */
/*
* Copyright (c) 2002 Markus Friedl. All rights reserved.
*
@@ -25,7 +25,7 @@
#ifndef SSH_MSG_H
#define SSH_MSG_H
-void msg_send(int, u_char, Buffer *);
-int msg_recv(int, Buffer *);
+void ssh_msg_send(int, u_char, Buffer *);
+int ssh_msg_recv(int, Buffer *);
#endif
diff --git a/usr.bin/ssh/ssh-keysign.c b/usr.bin/ssh/ssh-keysign.c
index aa0815381cb..19f275b94d2 100644
--- a/usr.bin/ssh/ssh-keysign.c
+++ b/usr.bin/ssh/ssh-keysign.c
@@ -22,7 +22,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keysign.c,v 1.8 2002/11/07 22:08:07 markus Exp $");
+RCSID("$OpenBSD: ssh-keysign.c,v 1.9 2002/12/19 00:07:02 djm Exp $");
#include <openssl/evp.h>
#include <openssl/rand.h>
@@ -196,8 +196,8 @@ main(int argc, char **argv)
fatal("no hostkey found");
buffer_init(&b);
- if (msg_recv(STDIN_FILENO, &b) < 0)
- fatal("msg_recv failed");
+ if (ssh_msg_recv(STDIN_FILENO, &b) < 0)
+ fatal("ssh_msg_recv failed");
if (buffer_get_char(&b) != version)
fatal("bad version");
fd = buffer_get_int(&b);
@@ -229,7 +229,7 @@ main(int argc, char **argv)
/* send reply */
buffer_clear(&b);
buffer_put_string(&b, signature, slen);
- msg_send(STDOUT_FILENO, version, &b);
+ ssh_msg_send(STDOUT_FILENO, version, &b);
return (0);
}
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 504a3c4d31a..b39b59bed42 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.109 2002/12/13 10:03:15 markus Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.110 2002/12/19 00:07:02 djm Exp $");
#include "ssh.h"
#include "ssh2.h"
@@ -945,9 +945,9 @@ ssh_keysign(Key *key, u_char **sigp, u_int *lenp,
buffer_init(&b);
buffer_put_int(&b, packet_get_connection_in()); /* send # of socket */
buffer_put_string(&b, data, datalen);
- msg_send(to[1], version, &b);
+ ssh_msg_send(to[1], version, &b);
- if (msg_recv(from[0], &b) < 0) {
+ if (ssh_msg_recv(from[0], &b) < 0) {
error("ssh_keysign: no reply");
buffer_clear(&b);
return -1;