[BACK]Return to channels.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/channels.c between version 1.166 and 1.167

version 1.166, 2002/02/05 14:32:55 version 1.167, 2002/02/06 14:55:15
Line 1004 
Line 1004 
                     SSH_CHANNEL_OPENING, newsock, newsock, -1,                      SSH_CHANNEL_OPENING, newsock, newsock, -1,
                     c->local_window_max, c->local_maxpacket,                      c->local_window_max, c->local_maxpacket,
                     0, xstrdup(buf), 1);                      0, xstrdup(buf), 1);
                 if (nc == NULL) {  
                         close(newsock);  
                         xfree(remote_ipaddr);  
                         return;  
                 }  
                 if (compat20) {                  if (compat20) {
                         packet_start(SSH2_MSG_CHANNEL_OPEN);                          packet_start(SSH2_MSG_CHANNEL_OPEN);
                         packet_put_cstring("x11");                          packet_put_cstring("x11");
Line 1126 
Line 1121 
                     nextstate, newsock, newsock, -1,                      nextstate, newsock, newsock, -1,
                     c->local_window_max, c->local_maxpacket,                      c->local_window_max, c->local_maxpacket,
                     0, xstrdup(rtype), 1);                      0, xstrdup(rtype), 1);
                 if (nc == NULL) {  
                         error("channel_post_port_listener: no new channel:");  
                         close(newsock);  
                         return;  
                 }  
                 nc->listening_port = c->listening_port;                  nc->listening_port = c->listening_port;
                 nc->host_port = c->host_port;                  nc->host_port = c->host_port;
                 strlcpy(nc->path, c->path, sizeof(nc->path));                  strlcpy(nc->path, c->path, sizeof(nc->path));
Line 1173 
Line 1163 
                     SSH_CHANNEL_OPENING, newsock, newsock, -1,                      SSH_CHANNEL_OPENING, newsock, newsock, -1,
                     c->local_window_max, c->local_maxpacket,                      c->local_window_max, c->local_maxpacket,
                     0, name, 1);                      0, name, 1);
                 if (nc == NULL) {  
                         error("channel_post_auth_listener: channel_new failed");  
                         xfree(name);  
                         close(newsock);  
                 }  
                 if (compat20) {                  if (compat20) {
                         packet_start(SSH2_MSG_CHANNEL_OPEN);                          packet_start(SSH2_MSG_CHANNEL_OPEN);
                         packet_put_cstring("auth-agent@openssh.com");                          packet_put_cstring("auth-agent@openssh.com");
Line 1977 
Line 1962 
                 c = channel_new("connected socket",                  c = channel_new("connected socket",
                     SSH_CHANNEL_CONNECTING, sock, sock, -1, 0, 0, 0,                      SSH_CHANNEL_CONNECTING, sock, sock, -1, 0, 0, 0,
                     originator_string, 1);                      originator_string, 1);
                 if (c == NULL) {                  c->remote_id = remote_id;
                         error("channel_input_port_open: channel_new failed");  
                         close(sock);  
                 } else {  
                         c->remote_id = remote_id;  
                 }  
         }          }
         if (c == NULL) {          if (c == NULL) {
                 packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE);                  packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE);
Line 2079 
Line 2059 
                 c = channel_new("port listener", type, sock, sock, -1,                  c = channel_new("port listener", type, sock, sock, -1,
                     CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT,                      CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT,
                     0, xstrdup("port listener"), 1);                      0, xstrdup("port listener"), 1);
                 if (c == NULL) {  
                         error("channel_setup_fwd_listener: channel_new failed");  
                         close(sock);  
                         continue;  
                 }  
                 strlcpy(c->path, host, sizeof(c->path));                  strlcpy(c->path, host, sizeof(c->path));
                 c->host_port = port_to_connect;                  c->host_port = port_to_connect;
                 c->listening_port = listen_port;                  c->listening_port = listen_port;
Line 2407 
Line 2382 
                     SSH_CHANNEL_X11_LISTENER, sock, sock, -1,                      SSH_CHANNEL_X11_LISTENER, sock, sock, -1,
                     CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT,                      CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT,
                     0, xstrdup("X11 inet listener"), 1);                      0, xstrdup("X11 inet listener"), 1);
                 if (nc != NULL)                  nc->single_connection = single_connection;
                         nc->single_connection = single_connection;  
         }          }
   
         /* Return the display number for the DISPLAY environment variable. */          /* Return the display number for the DISPLAY environment variable. */
Line 2560 
Line 2534 
                 c = channel_new("connected x11 socket",                  c = channel_new("connected x11 socket",
                     SSH_CHANNEL_X11_OPEN, sock, sock, -1, 0, 0, 0,                      SSH_CHANNEL_X11_OPEN, sock, sock, -1, 0, 0, 0,
                     remote_host, 1);                      remote_host, 1);
                 if (c == NULL) {                  c->remote_id = remote_id;
                         error("x11_input_open: channel_new failed");                  c->force_drain = 1;
                         close(sock);  
                 } else {  
                         c->remote_id = remote_id;  
                         c->force_drain = 1;  
                 }  
         }          }
         if (c == NULL) {          if (c == NULL) {
                 /* Send refusal to the remote host. */                  /* Send refusal to the remote host. */
Line 2780 
Line 2749 
             SSH_CHANNEL_AUTH_SOCKET, sock, sock, -1,              SSH_CHANNEL_AUTH_SOCKET, sock, sock, -1,
             CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT,              CHAN_X11_WINDOW_DEFAULT, CHAN_X11_PACKET_DEFAULT,
             0, xstrdup("auth socket"), 1);              0, xstrdup("auth socket"), 1);
         if (nc == NULL) {  
                 error("auth_input_request_forwarding: channel_new failed");  
                 auth_sock_cleanup_proc(pw);  
                 fatal_remove_cleanup(auth_sock_cleanup_proc, pw);  
                 close(sock);  
                 return 0;  
         }  
         strlcpy(nc->path, auth_sock_name, sizeof(nc->path));          strlcpy(nc->path, auth_sock_name, sizeof(nc->path));
         return 1;          return 1;
 }  }
Line 2820 
Line 2782 
                 name = xstrdup("authentication agent connection");                  name = xstrdup("authentication agent connection");
                 c = channel_new("", SSH_CHANNEL_OPEN, sock, sock,                  c = channel_new("", SSH_CHANNEL_OPEN, sock, sock,
                     -1, 0, 0, 0, name, 1);                      -1, 0, 0, 0, name, 1);
                 if (c == NULL) {                  c->remote_id = remote_id;
                         error("auth_input_open_request: channel_new failed");                  c->force_drain = 1;
                         xfree(name);  
                         close(sock);  
                 } else {  
                         c->remote_id = remote_id;  
                         c->force_drain = 1;  
                 }  
         }          }
         if (c == NULL) {          if (c == NULL) {
                 packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE);                  packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE);

Legend:
Removed from v.1.166  
changed lines
  Added in v.1.167