summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-27 23:54:55 +1100
committerDamien Miller <djm@mindrot.org>1999-12-27 23:54:55 +1100
commit68e45de53b72087a77069a61c4e789e2012cd706 (patch)
treeb65e919ad35f4b6b8ba1119a1506ed42dc8eb352
parent6a5d4d61bd6109c61bbbb6b7cd48422466260319 (diff)
- OpenBSD CVS updates:
- [packet.h auth-rhosts.c] check format string for packet_disconnect and packet_send_debug, too - [channels.c] use packet_get_maxsize for channels. consistence.
-rw-r--r--ChangeLog5
-rw-r--r--auth-rhosts.c4
-rw-r--r--channels.c17
-rw-r--r--packet.h6
4 files changed, 18 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ce91f30..984e1550 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,11 @@
- Explained spurious PAM auth warning workaround in UPGRADING
- Use last few chars of tty line as ut_id
- New SuSE RPM spec file from Chris Saia <csaia@wtower.com>
+ - OpenBSD CVS updates:
+ - [packet.h auth-rhosts.c]
+ check format string for packet_disconnect and packet_send_debug, too
+ - [channels.c]
+ use packet_get_maxsize for channels. consistence.
19991226
- Enabled utmpx support by default for Solaris
diff --git a/auth-rhosts.c b/auth-rhosts.c
index 2f12f134..318bcfef 100644
--- a/auth-rhosts.c
+++ b/auth-rhosts.c
@@ -16,7 +16,7 @@
*/
#include "includes.h"
-RCSID("$Id: auth-rhosts.c,v 1.6 1999/11/25 00:54:57 damien Exp $");
+RCSID("$Id: auth-rhosts.c,v 1.7 1999/12/27 12:54:55 damien Exp $");
#include "packet.h"
#include "ssh.h"
@@ -205,7 +205,7 @@ auth_rhosts(struct passwd *pw, const char *client_user)
if (stat(pw->pw_dir, &st) < 0) {
log("Rhosts authentication refused for %.100s: no home directory %.200s",
pw->pw_name, pw->pw_dir);
- packet_send_debug("Rhosts authentication refused for %.100: no home directory %.200s",
+ packet_send_debug("Rhosts authentication refused for %.100s: no home directory %.200s",
pw->pw_name, pw->pw_dir);
return 0;
}
diff --git a/channels.c b/channels.c
index 539dff3a..8455518e 100644
--- a/channels.c
+++ b/channels.c
@@ -16,7 +16,7 @@
*/
#include "includes.h"
-RCSID("$Id: channels.c,v 1.13 1999/12/21 00:18:08 damien Exp $");
+RCSID("$Id: channels.c,v 1.14 1999/12/27 12:54:55 damien Exp $");
#include "ssh.h"
#include "packet.h"
@@ -251,7 +251,7 @@ redo:
packet_put_int(ch->remote_id);
packet_send();
ch->type = SSH_CHANNEL_CLOSED;
- debug("Closing channel %d after input drain.", i);
+ debug("Closing channel %d after input drain.", ch->self);
break;
}
break;
@@ -443,17 +443,16 @@ channel_after_select(fd_set * readset, fd_set * writeset)
* for connections from clients.
*/
if (FD_ISSET(ch->sock, readset)) {
- int nchan;
- len = sizeof(addr);
- newsock = accept(ch->sock, &addr, &len);
+ addrlen = sizeof(addr);
+ newsock = accept(ch->sock, &addr, &addrlen);
if (newsock < 0) {
error("accept from auth socket: %.100s", strerror(errno));
break;
}
- nchan = channel_allocate(SSH_CHANNEL_OPENING, newsock,
+ newch = channel_allocate(SSH_CHANNEL_OPENING, newsock,
xstrdup("accepted auth socket"));
packet_start(SSH_SMSG_AGENT_OPEN);
- packet_put_int(nchan);
+ packet_put_int(newch);
packet_send();
}
break;
@@ -547,8 +546,8 @@ channel_output_poll()
len = 512;
} else {
/* Keep the packets at reasonable size. */
- if (len > 16384)
- len = 16384;
+ if (len > packet_get_maxsize()/2)
+ len = packet_get_maxsize()/2;
}
packet_start(SSH_MSG_CHANNEL_DATA);
packet_put_int(ch->remote_id);
diff --git a/packet.h b/packet.h
index e6ae671a..84c8ee75 100644
--- a/packet.h
+++ b/packet.h
@@ -13,7 +13,7 @@
*
*/
-/* RCSID("$Id: packet.h,v 1.7 1999/11/25 00:54:59 damien Exp $"); */
+/* RCSID("$Id: packet.h,v 1.8 1999/12/27 12:54:55 damien Exp $"); */
#ifndef PACKET_H
#define PACKET_H
@@ -151,7 +151,7 @@ char *packet_get_string(unsigned int *length_ptr);
* The error message should not contain a newline. The total length of the
* message must not exceed 1024 bytes.
*/
-void packet_disconnect(const char *fmt,...);
+void packet_disconnect(const char *fmt,...) __attribute__((format(printf, 1, 2)));;
/*
* Sends a diagnostic message to the other side. This message can be sent at
@@ -163,7 +163,7 @@ void packet_disconnect(const char *fmt,...);
* remote side protocol flags do not indicate that it supports SSH_MSG_DEBUG,
* this will do nothing.
*/
-void packet_send_debug(const char *fmt,...);
+void packet_send_debug(const char *fmt,...) __attribute__((format(printf, 1, 2)));;
/* Checks if there is any buffered output, and tries to write some of the output. */
void packet_write_poll(void);