From 1c992c4c13ea6c8fcd80093b340bc49753e17a4f Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 3 Oct 2002 15:45:53 +1000 Subject: - (djm) Bug #406 s/msg_send/ssh_msh_send/ for Mac OS X 1.2 --- ChangeLog | 3 ++- msg.c | 18 +++++++++--------- msg.h | 4 ++-- ssh-keysign.c | 6 +++--- sshconnect2.c | 4 ++-- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e956f8c..87604663 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ [version.h] OpenSSH 3.5 - (djm) Bump RPM spec version numbers + - (djm) Bug #406 s/msg_send/ssh_msh_send/ for Mac OS X 1.2 20020930 - (djm) Tidy contrib/, add Makefile for GNOME passphrase dialogs, @@ -756,4 +757,4 @@ save auth method before monitor_reset_key_state(); bugzilla bug #284; ok provos@ -$Id: ChangeLog,v 1.2491 2002/10/03 01:56:58 djm Exp $ +$Id: ChangeLog,v 1.2491.2.1 2002/10/03 05:45:53 djm Exp $ diff --git a/msg.c b/msg.c index de19b057..107a3769 100644 --- a/msg.c +++ b/msg.c @@ -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/msg.h b/msg.h index 13fa95b2..8980e254 100644 --- a/msg.h +++ b/msg.h @@ -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/ssh-keysign.c b/ssh-keysign.c index 06d28efa..79aee17c 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -206,8 +206,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); @@ -239,7 +239,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/sshconnect2.c b/sshconnect2.c index 0e93496b..703d0721 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -947,9 +947,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; -- cgit v1.2.3