summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2004-01-21 11:02:50 +1100
committerDamien Miller <djm@mindrot.org>2004-01-21 11:02:50 +1100
commitfb1310eded0788f106dc7e1f113cc75e1206cb60 (patch)
treecca2dacd20182354f8b704f62ab03a16a27a9e8f /serverloop.c
parenta04ad496f65ba1c0b6c71c13943ede2711464bc3 (diff)
- markus@cvs.openbsd.org 2004/01/19 21:25:15
[auth2-hostbased.c auth2-pubkey.c serverloop.c ssh-keysign.c sshconnect2.c] fix mem leaks; some fixes from Pete Flugstad; tested dtucker@
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/serverloop.c b/serverloop.c
index bc7cd656a..a777a048d 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: serverloop.c,v 1.114 2003/12/09 15:28:43 markus Exp $"); 38RCSID("$OpenBSD: serverloop.c,v 1.115 2004/01/19 21:25:15 markus Exp $");
39 39
40#include "xmalloc.h" 40#include "xmalloc.h"
41#include "packet.h" 41#include "packet.h"
@@ -850,7 +850,7 @@ server_input_window_size(int type, u_int32_t seq, void *ctxt)
850} 850}
851 851
852static Channel * 852static Channel *
853server_request_direct_tcpip(char *ctype) 853server_request_direct_tcpip(void)
854{ 854{
855 Channel *c; 855 Channel *c;
856 int sock; 856 int sock;
@@ -872,14 +872,14 @@ server_request_direct_tcpip(char *ctype)
872 xfree(originator); 872 xfree(originator);
873 if (sock < 0) 873 if (sock < 0)
874 return NULL; 874 return NULL;
875 c = channel_new(ctype, SSH_CHANNEL_CONNECTING, 875 c = channel_new("direct-tcpip", SSH_CHANNEL_CONNECTING,
876 sock, sock, -1, CHAN_TCP_WINDOW_DEFAULT, 876 sock, sock, -1, CHAN_TCP_WINDOW_DEFAULT,
877 CHAN_TCP_PACKET_DEFAULT, 0, "direct-tcpip", 1); 877 CHAN_TCP_PACKET_DEFAULT, 0, "direct-tcpip", 1);
878 return c; 878 return c;
879} 879}
880 880
881static Channel * 881static Channel *
882server_request_session(char *ctype) 882server_request_session(void)
883{ 883{
884 Channel *c; 884 Channel *c;
885 885
@@ -891,7 +891,7 @@ server_request_session(char *ctype)
891 * SSH_CHANNEL_LARVAL. Additionally, a callback for handling all 891 * SSH_CHANNEL_LARVAL. Additionally, a callback for handling all
892 * CHANNEL_REQUEST messages is registered. 892 * CHANNEL_REQUEST messages is registered.
893 */ 893 */
894 c = channel_new(ctype, SSH_CHANNEL_LARVAL, 894 c = channel_new("session", SSH_CHANNEL_LARVAL,
895 -1, -1, -1, /*window size*/0, CHAN_SES_PACKET_DEFAULT, 895 -1, -1, -1, /*window size*/0, CHAN_SES_PACKET_DEFAULT,
896 0, "server-session", 1); 896 0, "server-session", 1);
897 if (session_open(the_authctxt, c->self) != 1) { 897 if (session_open(the_authctxt, c->self) != 1) {
@@ -920,9 +920,9 @@ server_input_channel_open(int type, u_int32_t seq, void *ctxt)
920 ctype, rchan, rwindow, rmaxpack); 920 ctype, rchan, rwindow, rmaxpack);
921 921
922 if (strcmp(ctype, "session") == 0) { 922 if (strcmp(ctype, "session") == 0) {
923 c = server_request_session(ctype); 923 c = server_request_session();
924 } else if (strcmp(ctype, "direct-tcpip") == 0) { 924 } else if (strcmp(ctype, "direct-tcpip") == 0) {
925 c = server_request_direct_tcpip(ctype); 925 c = server_request_direct_tcpip();
926 } 926 }
927 if (c != NULL) { 927 if (c != NULL) {
928 debug("server_input_channel_open: confirm %s", ctype); 928 debug("server_input_channel_open: confirm %s", ctype);