|
Lines 152-157
static int escape_pending1; /* Last char
Link Here
|
| 152 |
static int last_was_cr; /* Last character was a newline. */ |
152 |
static int last_was_cr; /* Last character was a newline. */ |
| 153 |
static int exit_status; /* Used to store the command exit status. */ |
153 |
static int exit_status; /* Used to store the command exit status. */ |
| 154 |
static int stdin_eof; /* EOF has been encountered on stderr. */ |
154 |
static int stdin_eof; /* EOF has been encountered on stderr. */ |
|
|
155 |
static int agent_disabled = 0; /* Agent forwarding disabled during session */ |
| 155 |
static Buffer stdin_buffer; /* Buffer for stdin data. */ |
156 |
static Buffer stdin_buffer; /* Buffer for stdin data. */ |
| 156 |
static Buffer stdout_buffer; /* Buffer for stdout data. */ |
157 |
static Buffer stdout_buffer; /* Buffer for stdout data. */ |
| 157 |
static Buffer stderr_buffer; /* Buffer for stderr data. */ |
158 |
static Buffer stderr_buffer; /* Buffer for stderr data. */ |
|
Lines 1038-1043
process_escapes(Channel *c, Buffer *bin,
Link Here
|
| 1038 |
/* We have been continued. */ |
1039 |
/* We have been continued. */ |
| 1039 |
continue; |
1040 |
continue; |
| 1040 |
|
1041 |
|
|
|
1042 |
case 'A': |
| 1043 |
if (options.forward_agent) { |
| 1044 |
agent_disabled = 1; |
| 1045 |
options.forward_agent = 0; |
| 1046 |
snprintf(string, sizeof(string), |
| 1047 |
"%ca [agent forwarding disabled]\r\n", |
| 1048 |
escape_char); |
| 1049 |
} else { |
| 1050 |
snprintf(string, sizeof(string), |
| 1051 |
"%ca [agent already disabled]\r\n", |
| 1052 |
escape_char); |
| 1053 |
} |
| 1054 |
buffer_append(berr, string, strlen(string)); |
| 1055 |
continue; |
| 1056 |
|
| 1041 |
case 'B': |
1057 |
case 'B': |
| 1042 |
if (compat20) { |
1058 |
if (compat20) { |
| 1043 |
snprintf(string, sizeof string, |
1059 |
snprintf(string, sizeof string, |
|
Lines 1119-1124
process_escapes(Channel *c, Buffer *bin,
Link Here
|
| 1119 |
"%c?\r\n\ |
1135 |
"%c?\r\n\ |
| 1120 |
Supported escape sequences:\r\n\ |
1136 |
Supported escape sequences:\r\n\ |
| 1121 |
%c. - terminate session\r\n\ |
1137 |
%c. - terminate session\r\n\ |
|
|
1138 |
%cA - disable agent forwarding\r\n\ |
| 1122 |
%cB - send a BREAK to the remote system\r\n\ |
1139 |
%cB - send a BREAK to the remote system\r\n\ |
| 1123 |
%cR - Request rekey (SSH protocol 2 only)\r\n\ |
1140 |
%cR - Request rekey (SSH protocol 2 only)\r\n\ |
| 1124 |
%c# - list forwarded connections\r\n\ |
1141 |
%c# - list forwarded connections\r\n\ |
|
Lines 1128-1134
Supported escape sequences:\r\n\
Link Here
|
| 1128 |
escape_char, escape_char, |
1145 |
escape_char, escape_char, |
| 1129 |
escape_char, escape_char, |
1146 |
escape_char, escape_char, |
| 1130 |
escape_char, escape_char, |
1147 |
escape_char, escape_char, |
| 1131 |
escape_char, escape_char); |
1148 |
escape_char, escape_char, |
|
|
1149 |
escape_char); |
| 1132 |
} else { |
1150 |
} else { |
| 1133 |
snprintf(string, sizeof string, |
1151 |
snprintf(string, sizeof string, |
| 1134 |
"%c?\r\n\ |
1152 |
"%c?\r\n\ |
|
Lines 1889-1895
client_input_channel_open(int type, u_in
Link Here
|
| 1889 |
} else if (strcmp(ctype, "x11") == 0) { |
1907 |
} else if (strcmp(ctype, "x11") == 0) { |
| 1890 |
c = client_request_x11(ctype, rchan); |
1908 |
c = client_request_x11(ctype, rchan); |
| 1891 |
} else if (strcmp(ctype, "auth-agent@openssh.com") == 0) { |
1909 |
} else if (strcmp(ctype, "auth-agent@openssh.com") == 0) { |
| 1892 |
c = client_request_agent(ctype, rchan); |
1910 |
if (agent_disabled) |
|
|
1911 |
debug("Agent authentication request, but agent forwarding disabled"); |
| 1912 |
else |
| 1913 |
c = client_request_agent(ctype, rchan); |
| 1893 |
} |
1914 |
} |
| 1894 |
/* XXX duplicate : */ |
1915 |
/* XXX duplicate : */ |
| 1895 |
if (c != NULL) { |
1916 |
if (c != NULL) { |