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

Diff for /src/usr.bin/ssh/ssh.c between version 1.314 and 1.315

version 1.314, 2008/06/10 22:15:23 version 1.315, 2008/06/12 04:06:00
Line 155 
Line 155 
 int subsystem_flag = 0;  int subsystem_flag = 0;
   
 /* # of replies received for global requests */  /* # of replies received for global requests */
 static int client_global_request_id = 0;  static int remote_forward_confirms_received = 0;
   
 /* pid of proxycommand child process */  /* pid of proxycommand child process */
 pid_t proxy_command_pid = 0;  pid_t proxy_command_pid = 0;
Line 798 
Line 798 
         return exit_status;          return exit_status;
 }  }
   
   /* Callback for remote forward global requests */
 static void  static void
   ssh_confirm_remote_forward(int type, u_int32_t seq, void *ctxt)
   {
           Forward *rfwd = (Forward *)ctxt;
   
           debug("remote forward %s for: listen %d, connect %s:%d",
               type == SSH2_MSG_REQUEST_SUCCESS ? "success" : "failure",
               rfwd->listen_port, rfwd->connect_host, rfwd->connect_port);
           if (type == SSH2_MSG_REQUEST_FAILURE) {
                   if (options.exit_on_forward_failure)
                           fatal("Error: remote port forwarding failed for "
                               "listen port %d", rfwd->listen_port);
                   else
                           logit("Warning: remote port forwarding failed for "
                               "listen port %d", rfwd->listen_port);
           }
           if (++remote_forward_confirms_received == options.num_remote_forwards)
                   debug("All remote forwarding requests processed");
                   /* XXX fork-after-authentication */
   }
   
   static void
 ssh_init_forwarding(void)  ssh_init_forwarding(void)
 {  {
         int success = 0;          int success = 0;
Line 846 
Line 868 
                                 logit("Warning: Could not request remote "                                  logit("Warning: Could not request remote "
                                     "forwarding.");                                      "forwarding.");
                 }                  }
                   client_register_global_confirm(ssh_confirm_remote_forward,
                       &options.remote_forwards[i]);
         }          }
   
         /* Initiate tunnel forwarding. */          /* Initiate tunnel forwarding. */
Line 1013 
Line 1037 
         /* Enter the interactive session. */          /* Enter the interactive session. */
         return client_loop(have_tty, tty_flag ?          return client_loop(have_tty, tty_flag ?
             options.escape_char : SSH_ESCAPECHAR_NONE, 0);              options.escape_char : SSH_ESCAPECHAR_NONE, 0);
 }  
   
 void  
 client_global_request_reply_fwd(int type, u_int32_t seq, void *ctxt)  
 {  
         int i;  
   
         i = client_global_request_id++;  
         if (i >= options.num_remote_forwards)  
                 return;  
         debug("remote forward %s for: listen %d, connect %s:%d",  
             type == SSH2_MSG_REQUEST_SUCCESS ? "success" : "failure",  
             options.remote_forwards[i].listen_port,  
             options.remote_forwards[i].connect_host,  
             options.remote_forwards[i].connect_port);  
         if (type == SSH2_MSG_REQUEST_FAILURE) {  
                 if (options.exit_on_forward_failure)  
                         fatal("Error: remote port forwarding failed for "  
                             "listen port %d",  
                             options.remote_forwards[i].listen_port);  
                 else  
                         logit("Warning: remote port forwarding failed for "  
                             "listen port %d",  
                             options.remote_forwards[i].listen_port);  
         }  
 }  }
   
 /* request pty/x11/agent/tcpfwd/shell for channel */  /* request pty/x11/agent/tcpfwd/shell for channel */

Legend:
Removed from v.1.314  
changed lines
  Added in v.1.315