Mercurial > dropbear
comparison 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 |
comparison
equal
deleted
inserted
replaced
478:d4f32c3443ac | 485:12d845ab7b5f |
---|---|
195 cli_auth_try(); | 195 cli_auth_try(); |
196 cli_ses.state = USERAUTH_REQ_SENT; | 196 cli_ses.state = USERAUTH_REQ_SENT; |
197 TRACE(("leave cli_sessionloop: cli_auth_try")) | 197 TRACE(("leave cli_sessionloop: cli_auth_try")) |
198 return; | 198 return; |
199 | 199 |
200 /* | |
201 case USERAUTH_SUCCESS_RCVD: | |
202 send_msg_service_request(SSH_SERVICE_CONNECTION); | |
203 cli_ses.state = SERVICE_CONN_REQ_SENT; | |
204 TRACE(("leave cli_sessionloop: sent ssh-connection service req")) | |
205 return; | |
206 | |
207 case SERVICE_CONN_ACCEPT_RCVD: | |
208 cli_send_chansess_request(); | |
209 TRACE(("leave cli_sessionloop: cli_send_chansess_request")) | |
210 cli_ses.state = SESSION_RUNNING; | |
211 return; | |
212 */ | |
213 | |
214 case USERAUTH_SUCCESS_RCVD: | 200 case USERAUTH_SUCCESS_RCVD: |
215 | 201 |
216 if (cli_opts.backgrounded) { | 202 if (cli_opts.backgrounded) { |
217 int devnull; | 203 int devnull; |
218 /* keeping stdin open steals input from the terminal and | 204 /* keeping stdin open steals input from the terminal and |
228 errno, strerror(errno)); | 214 errno, strerror(errno)); |
229 } | 215 } |
230 } | 216 } |
231 | 217 |
232 #ifdef ENABLE_CLI_LOCALTCPFWD | 218 #ifdef ENABLE_CLI_LOCALTCPFWD |
233 //setup_localtcp(); | 219 setup_localtcp(); |
234 #endif | 220 #endif |
235 #ifdef ENABLE_CLI_REMOTETCPFWD | 221 #ifdef ENABLE_CLI_REMOTETCPFWD |
236 //setup_remotetcp(); | 222 setup_remotetcp(); |
237 #endif | 223 #endif |
238 if (!cli_opts.no_cmd) { | 224 |
225 #ifdef ENABLE_CLI_NETCAT | |
226 if (cli_opts.netcat_host) { | |
227 cli_send_netcat_request(); | |
228 } else | |
229 #endif | |
230 if (!cli_opts.no_cmd) { | |
239 cli_send_chansess_request(); | 231 cli_send_chansess_request(); |
240 } | 232 } |
241 TRACE(("leave cli_sessionloop: running")) | 233 TRACE(("leave cli_sessionloop: running")) |
242 cli_ses.state = SESSION_RUNNING; | 234 cli_ses.state = SESSION_RUNNING; |
243 return; | 235 return; |