|
Lines 138-143
Link Here
|
| 138 |
/* Should we execute a command or invoke a subsystem? */ |
138 |
/* Should we execute a command or invoke a subsystem? */ |
| 139 |
int subsystem_flag = 0; |
139 |
int subsystem_flag = 0; |
| 140 |
|
140 |
|
|
|
141 |
/* # of replies received for global requests */ |
| 142 |
static int client_global_request_id = 0; |
| 143 |
|
| 141 |
/* Prints a help message to the user. This function never returns. */ |
144 |
/* Prints a help message to the user. This function never returns. */ |
| 142 |
|
145 |
|
| 143 |
static void |
146 |
static void |
|
Lines 1019-1024
Link Here
|
| 1019 |
if (type == SSH2_MSG_CHANNEL_FAILURE) |
1022 |
if (type == SSH2_MSG_CHANNEL_FAILURE) |
| 1020 |
fatal("Request for subsystem '%.*s' failed on channel %d", |
1023 |
fatal("Request for subsystem '%.*s' failed on channel %d", |
| 1021 |
len, (u_char *)buffer_ptr(&command), id); |
1024 |
len, (u_char *)buffer_ptr(&command), id); |
|
|
1025 |
} |
| 1026 |
|
| 1027 |
void |
| 1028 |
client_global_request_reply(int type, u_int32_t seq, void *ctxt) |
| 1029 |
{ |
| 1030 |
int i; |
| 1031 |
|
| 1032 |
i = client_global_request_id++; |
| 1033 |
if (i >= options.num_remote_forwards) { |
| 1034 |
error("client_global_request_reply: too many replies %d > %d", |
| 1035 |
i, options.num_remote_forwards); |
| 1036 |
return; |
| 1037 |
} |
| 1038 |
debug("remote forward %s for: listen %d, connect %s:%d", |
| 1039 |
type == SSH2_MSG_REQUEST_SUCCESS ? "success" : "failure", |
| 1040 |
options.remote_forwards[i].port, |
| 1041 |
options.remote_forwards[i].host, |
| 1042 |
options.remote_forwards[i].host_port); |
| 1043 |
if (type == SSH2_MSG_REQUEST_FAILURE) |
| 1044 |
log("Warning: remote port forwarding failed for listen port %d", |
| 1045 |
options.remote_forwards[i].port); |
| 1022 |
} |
1046 |
} |
| 1023 |
|
1047 |
|
| 1024 |
/* request pty/x11/agent/tcpfwd/shell for channel */ |
1048 |
/* request pty/x11/agent/tcpfwd/shell for channel */ |