diff cli-session.c @ 485:12d845ab7b5f dbclient-netcat-alike

Rework netcat-alike to be a proper mode, with -B argument.
author Matt Johnston <matt@ucc.asn.au>
date Wed, 17 Sep 2008 14:36:49 +0000
parents d4f32c3443ac
children d59f628e7baa
line wrap: on
line diff
--- a/cli-session.c	Sun Sep 14 06:47:51 2008 +0000
+++ b/cli-session.c	Wed Sep 17 14:36:49 2008 +0000
@@ -197,20 +197,6 @@
 			TRACE(("leave cli_sessionloop: cli_auth_try"))
 			return;
 
-			/*
-		case USERAUTH_SUCCESS_RCVD:
-			send_msg_service_request(SSH_SERVICE_CONNECTION);
-			cli_ses.state = SERVICE_CONN_REQ_SENT;
-			TRACE(("leave cli_sessionloop: sent ssh-connection service req"))
-			return;
-
-		case SERVICE_CONN_ACCEPT_RCVD:
-			cli_send_chansess_request();
-			TRACE(("leave cli_sessionloop: cli_send_chansess_request"))
-			cli_ses.state = SESSION_RUNNING;
-			return;
-			*/
-
 		case USERAUTH_SUCCESS_RCVD:
 
 			if (cli_opts.backgrounded) {
@@ -230,12 +216,18 @@
 			}
 			
 #ifdef ENABLE_CLI_LOCALTCPFWD
-			//setup_localtcp();
+			setup_localtcp();
 #endif
 #ifdef ENABLE_CLI_REMOTETCPFWD
-			//setup_remotetcp();
+			setup_remotetcp();
 #endif
-			if (!cli_opts.no_cmd) {
+
+#ifdef ENABLE_CLI_NETCAT
+			if (cli_opts.netcat_host) {
+				cli_send_netcat_request();
+			} else 
+#endif
+				if (!cli_opts.no_cmd) {
 				cli_send_chansess_request();
 			}
 			TRACE(("leave cli_sessionloop: running"))