OpenCoverage

serverloop.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssh/src/serverloop.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12-
13-
14-
15-
16extern ServerOptions options;-
17-
18-
19extern Authctxt *the_authctxt;-
20extern struct sshauthopt *auth_opts;-
21extern int use_privsep;-
22-
23static int no_more_sessions = 0;-
24-
25-
26-
27-
28-
29-
30static volatile sig_atomic_t child_terminated = 0;-
31-
32-
33static volatile sig_atomic_t received_sigterm = 0;-
34-
35-
36static void server_init_dispatch(void);-
37-
38-
39char *tun_fwd_ifnames = -
40 ((void *)0)-
41 ;-
42-
43-
44static int-
45bind_permitted(int port, uid_t uid)-
46{-
47 if (use_privsep
use_privsepDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
48 return
never executed: return 1;
1;
never executed: return 1;
0
49 if (port <
port < 1024Description
TRUEnever evaluated
FALSEnever evaluated
0
50 1024
port < 1024Description
TRUEnever evaluated
FALSEnever evaluated
0
51 && uid != 0
uid != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
52 return
never executed: return 0;
0;
never executed: return 0;
0
53 return
never executed: return 1;
1;
never executed: return 1;
0
54}-
55-
56-
57-
58-
59-
60static int notify_pipe[2];-
61static void-
62notify_setup(void)-
63{-
64 if (pipe(notify_pipe) < 0
pipe(notify_pipe) < 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
65 error("pipe(notify_pipe) failed %s", strerror(-
66 (*__errno_location ())-
67 ));-
68 }
never executed: end of block
else if ((
(fcntl(notify_...2 , 1 ) == -1)Description
TRUEnever evaluated
FALSEnever evaluated
fcntl(notify_pipe[0],
(fcntl(notify_...2 , 1 ) == -1)Description
TRUEnever evaluated
FALSEnever evaluated
0
69 2
(fcntl(notify_...2 , 1 ) == -1)Description
TRUEnever evaluated
FALSEnever evaluated
0
70 ,
(fcntl(notify_...2 , 1 ) == -1)Description
TRUEnever evaluated
FALSEnever evaluated
0
71 1
(fcntl(notify_...2 , 1 ) == -1)Description
TRUEnever evaluated
FALSEnever evaluated
0
72 ) == -1)
(fcntl(notify_...2 , 1 ) == -1)Description
TRUEnever evaluated
FALSEnever evaluated
||
0
73 (
(fcntl(notify_...2 , 1 ) == -1)Description
TRUEnever evaluated
FALSEnever evaluated
fcntl(notify_pipe[1],
(fcntl(notify_...2 , 1 ) == -1)Description
TRUEnever evaluated
FALSEnever evaluated
0
74 2
(fcntl(notify_...2 , 1 ) == -1)Description
TRUEnever evaluated
FALSEnever evaluated
0
75 ,
(fcntl(notify_...2 , 1 ) == -1)Description
TRUEnever evaluated
FALSEnever evaluated
0
76 1
(fcntl(notify_...2 , 1 ) == -1)Description
TRUEnever evaluated
FALSEnever evaluated
0
77 ) == -1)
(fcntl(notify_...2 , 1 ) == -1)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
78 error("fcntl(notify_pipe, F_SETFD) failed %s", strerror(-
79 (*__errno_location ())-
80 ));-
81 close(notify_pipe[0]);-
82 close(notify_pipe[1]);-
83 }
never executed: end of block
else {
0
84 set_nonblock(notify_pipe[0]);-
85 set_nonblock(notify_pipe[1]);-
86 return;
never executed: return;
0
87 }-
88 notify_pipe[0] = -1;-
89 notify_pipe[1] = -1;-
90}
never executed: end of block
0
91static void-
92notify_parent(void)-
93{-
94 if (notify_pipe[1] != -1
notify_pipe[1] != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
95 (
never executed: (void)write(notify_pipe[1], "", 1);
void)write(notify_pipe[1], "", 1);
never executed: (void)write(notify_pipe[1], "", 1);
0
96}
never executed: end of block
0
97static void-
98notify_prepare(fd_set *readset)-
99{-
100 if (notify_pipe[0] != -1
notify_pipe[0] != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
101 kludge_FD_SET(notify_pipe[0], readset);
never executed: kludge_FD_SET(notify_pipe[0], readset);
0
102}
never executed: end of block
0
103static void-
104notify_done(fd_set *readset)-
105{-
106 char c;-
107-
108 if (notify_pipe[0] != -1
notify_pipe[0] != -1Description
TRUEnever evaluated
FALSEnever evaluated
&& kludge_FD_ISSET(notify_pipe[0], readset)
kludge_FD_ISSE...e[0], readset)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
109 while (read(notify_pipe[0], &c, 1) != -1
read(notify_pi..., &c, 1) != -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
110 debug2("%s: reading", __func__);
never executed: debug2("%s: reading", __func__);
0
111}
never executed: end of block
0
112-
113-
114static void-
115sigchld_handler(int sig)-
116{-
117 int save_errno = -
118 (*__errno_location ())-
119 ;-
120 child_terminated = 1;-
121 notify_parent();-
122 -
123(*__errno_location ()) -
124 = save_errno;-
125}
never executed: end of block
0
126-
127-
128static void-
129sigterm_handler(int sig)-
130{-
131 received_sigterm = sig;-
132}
never executed: end of block
0
133-
134static void-
135client_alive_check(struct ssh *ssh)-
136{-
137 int channel_id;-
138 char remote_id[512];-
139-
140-
141 if (ssh_packet_inc_alive_timeouts(active_state) > options.client_alive_count_max
ssh_packet_inc...live_count_maxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
142 sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id));-
143 logit("Timeout, client not responding from %s", remote_id);-
144 cleanup_exit(255);-
145 }
never executed: end of block
0
146-
147-
148-
149-
150-
151 if ((
(channel_id = ...en(ssh)) == -1Description
TRUEnever evaluated
FALSEnever evaluated
channel_id = channel_find_open(ssh)) == -1
(channel_id = ...en(ssh)) == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
152 ssh_packet_start(active_state, (80));-
153 ssh_packet_put_cstring(active_state, ("keepalive@openssh.com"));-
154 ssh_packet_put_char(active_state, (1));-
155 }
never executed: end of block
else {
0
156 channel_request_start(ssh, channel_id,-
157 "keepalive@openssh.com", 1);-
158 }
never executed: end of block
0
159 ssh_packet_send(active_state);-
160}
never executed: end of block
0
161-
162-
163-
164-
165-
166-
167-
168static void-
169wait_until_can_do_something(struct ssh *ssh,-
170 int connection_in, int connection_out,-
171 fd_set **readsetp, fd_set **writesetp, int *maxfdp,-
172 u_int *nallocp, u_int64_t max_time_ms)-
173{-
174 struct timeval tv, *tvp;-
175 int ret;-
176 time_t minwait_secs = 0;-
177 int client_alive_scheduled = 0;-
178 static time_t last_client_time;-
179-
180-
181 channel_prepare_select(ssh, readsetp, writesetp, maxfdp,-
182 nallocp, &minwait_secs);-
183-
184-
185 if (minwait_secs != 0
minwait_secs != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
186 max_time_ms = (((
((max_time_ms)..._secs * 1000))Description
TRUEnever evaluated
FALSEnever evaluated
max_time_ms) < ((u_int)minwait_secs * 1000))
((max_time_ms)..._secs * 1000))Description
TRUEnever evaluated
FALSEnever evaluated
? (max_time_ms) : ((u_int)minwait_secs * 1000));
never executed: max_time_ms = (((max_time_ms) < ((u_int)minwait_secs * 1000)) ? (max_time_ms) : ((u_int)minwait_secs * 1000));
0
187 if (options.client_alive_interval
options.client_alive_intervalDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
188 uint64_t keepalive_ms =-
189 (uint64_t)options.client_alive_interval * 1000;-
190-
191 client_alive_scheduled = 1;-
192 if (max_time_ms == 0
max_time_ms == 0Description
TRUEnever evaluated
FALSEnever evaluated
|| max_time_ms > keepalive_ms
max_time_ms > keepalive_msDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
193 max_time_ms = keepalive_ms;
never executed: max_time_ms = keepalive_ms;
0
194 }
never executed: end of block
0
195-
196-
197-
198-
199-
200 kludge_FD_SET(connection_in, *readsetp);-
201 notify_prepare(*readsetp);-
202-
203-
204-
205-
206-
207 if (ssh_packet_have_data_to_write(active_state)
ssh_packet_hav...(active_state)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
208 kludge_FD_SET(connection_out, *writesetp);
never executed: kludge_FD_SET(connection_out, *writesetp);
0
209-
210-
211-
212-
213-
214 if (child_terminated
child_terminatedDescription
TRUEnever evaluated
FALSEnever evaluated
&& ssh_packet_not_very_much_data_to_write(active_state)
ssh_packet_not...(active_state)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
215 if (max_time_ms == 0
max_time_ms == 0Description
TRUEnever evaluated
FALSEnever evaluated
|| client_alive_scheduled
client_alive_scheduledDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
216 max_time_ms = 100;
never executed: max_time_ms = 100;
0
217-
218 if (max_time_ms == 0
max_time_ms == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
219 tvp =
never executed: tvp = ((void *)0) ;
0
220 ((void *)0)
never executed: tvp = ((void *)0) ;
0
221 ;
never executed: tvp = ((void *)0) ;
0
222 else {-
223 tv.tv_sec = max_time_ms / 1000;-
224 tv.tv_usec = 1000 * (max_time_ms % 1000);-
225 tvp = &tv;-
226 }
never executed: end of block
0
227-
228-
229 ret = select((*maxfdp)+1, *readsetp, *writesetp, -
230 ((void *)0)-
231 , tvp);-
232-
233 if (ret == -1
ret == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
234 memset(*readsetp, 0, *nallocp);-
235 memset(*writesetp, 0, *nallocp);-
236 if (-
237 (*
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEnever evaluated
__errno_location ())
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEnever evaluated
0
238 !=
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEnever evaluated
0
239 4
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEnever evaluated
0
240 )-
241 error("select: %.100s", strerror(
never executed: error("select: %.100s", strerror( (*__errno_location ()) ));
0
242 (*__errno_location ())
never executed: error("select: %.100s", strerror( (*__errno_location ()) ));
0
243 ));
never executed: error("select: %.100s", strerror( (*__errno_location ()) ));
0
244 }
never executed: end of block
else if (client_alive_scheduled
client_alive_scheduledDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
245 time_t now = monotime();-
246-
247 if (ret == 0
ret == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
248 client_alive_check(ssh);-
249 }
never executed: end of block
else if (kludge_FD_ISSET(connection_in, *readsetp)
kludge_FD_ISSE...in, *readsetp)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
250 last_client_time = now;-
251 }
never executed: end of block
else if (last_client_time != 0
last_client_time != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& last_client_time +
last_client_ti...nterval <= nowDescription
TRUEnever evaluated
FALSEnever evaluated
0
252 options.client_alive_interval <= now
last_client_ti...nterval <= nowDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
253 client_alive_check(ssh);-
254 last_client_time = now;-
255 }
never executed: end of block
0
256 }
never executed: end of block
0
257-
258 notify_done(*readsetp);-
259}
never executed: end of block
0
260-
261-
262-
263-
264-
265static int-
266process_input(struct ssh *ssh, fd_set *readset, int connection_in)-
267{-
268 int len;-
269 char buf[16384];-
270-
271-
272 if (kludge_FD_ISSET(connection_in, readset)
kludge_FD_ISSE...n_in, readset)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
273 len = read(connection_in, buf, sizeof(buf));-
274 if (len == 0
len == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
275 verbose("Connection closed by %.100s port %d",-
276 ssh_remote_ipaddr(ssh), ssh_remote_port(ssh));-
277 return
never executed: return -1;
-1;
never executed: return -1;
0
278 } else if (len < 0
len < 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
279 if (-
280 (*
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEnever evaluated
__errno_location ())
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEnever evaluated
0
281 !=
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEnever evaluated
0
282 4
(*__errno_location ()) != 4Description
TRUEnever evaluated
FALSEnever evaluated
0
283 && -
284 (*
(*__errno_location ()) != 11Description
TRUEnever evaluated
FALSEnever evaluated
__errno_location ())
(*__errno_location ()) != 11Description
TRUEnever evaluated
FALSEnever evaluated
0
285 !=
(*__errno_location ()) != 11Description
TRUEnever evaluated
FALSEnever evaluated
0
286 11
(*__errno_location ()) != 11Description
TRUEnever evaluated
FALSEnever evaluated
0
287 &&-
288 -
289 (*
(*__errno_location ()) != 11Description
TRUEnever evaluated
FALSEnever evaluated
__errno_location ())
(*__errno_location ()) != 11Description
TRUEnever evaluated
FALSEnever evaluated
0
290 !=
(*__errno_location ()) != 11Description
TRUEnever evaluated
FALSEnever evaluated
0
291 11
(*__errno_location ()) != 11Description
TRUEnever evaluated
FALSEnever evaluated
0
292 ) {-
293 verbose("Read error from remote host "-
294 "%.100s port %d: %.100s",-
295 ssh_remote_ipaddr(ssh),-
296 ssh_remote_port(ssh), strerror(-
297 (*__errno_location ())-
298 ));-
299 cleanup_exit(255);-
300 }
never executed: end of block
0
301 }
never executed: end of block
else {
0
302-
303 packet_process_incoming(buf, len);-
304 }
never executed: end of block
0
305 }-
306 return
never executed: return 0;
0;
never executed: return 0;
0
307}-
308-
309-
310-
311-
312static void-
313process_output(fd_set *writeset, int connection_out)-
314{-
315-
316 if (kludge_FD_ISSET(connection_out, writeset)
kludge_FD_ISSE...out, writeset)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
317 packet_write_poll();
never executed: packet_write_poll();
0
318}
never executed: end of block
0
319-
320static void-
321process_buffered_input_packets(struct ssh *ssh)-
322{-
323 ssh_dispatch_run_fatal(ssh, DISPATCH_NONBLOCK, -
324 ((void *)0)-
325 );-
326}
never executed: end of block
0
327-
328static void-
329collect_children(struct ssh *ssh)-
330{-
331 pid_t pid;-
332 sigset_t oset, nset;-
333 int status;-
334-
335-
336 sigemptyset(&nset);-
337 sigaddset(&nset, -
338 17-
339 );-
340 sigprocmask(-
341 0-
342 , &nset, &oset);-
343 if (child_terminated
child_terminatedDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
344 debug("Received SIGCHLD.");-
345 while ((
(pid = waitpid...atus, 1 )) > 0Description
TRUEnever evaluated
FALSEnever evaluated
pid = waitpid(-1, &status,
(pid = waitpid...atus, 1 )) > 0Description
TRUEnever evaluated
FALSEnever evaluated
0
346 1
(pid = waitpid...atus, 1 )) > 0Description
TRUEnever evaluated
FALSEnever evaluated
0
347 )) > 0
(pid = waitpid...atus, 1 )) > 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
348 (pid < 0
pid < 0Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
349 (*
(*__errno_location ()) == 4Description
TRUEnever evaluated
FALSEnever evaluated
__errno_location ())
(*__errno_location ()) == 4Description
TRUEnever evaluated
FALSEnever evaluated
0
350 ==
(*__errno_location ()) == 4Description
TRUEnever evaluated
FALSEnever evaluated
0
351 4
(*__errno_location ()) == 4Description
TRUEnever evaluated
FALSEnever evaluated
0
352 ))-
353 if (pid > 0
pid > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
354 session_close_by_pid(ssh, pid, status);
never executed: session_close_by_pid(ssh, pid, status);
0
355 child_terminated = 0;-
356 }
never executed: end of block
0
357 sigprocmask(-
358 2-
359 , &oset, -
360 ((void *)0)-
361 );-
362}
never executed: end of block
0
363-
364void-
365server_loop2(struct ssh *ssh, Authctxt *authctxt)-
366{-
367 fd_set *readset = -
368 ((void *)0)-
369 , *writeset = -
370 ((void *)0)-
371 ;-
372 int max_fd;-
373 u_int nalloc = 0, connection_in, connection_out;-
374 u_int64_t rekey_timeout_ms = 0;-
375-
376 debug("Entering interactive session for SSH2.");-
377-
378 mysignal(-
37917-
380,sigchld_handler);-
381 child_terminated = 0;-
382 connection_in = ssh_packet_get_connection_in(active_state);-
383 connection_out = ssh_packet_get_connection_out(active_state);-
384-
385 if (!use_privsep
!use_privsepDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
386 mysignal(-
387 15-
388 ,sigterm_handler);-
389 mysignal(-
390 2-
391 ,sigterm_handler);-
392 mysignal(-
393 3-
394 ,sigterm_handler);-
395 }
never executed: end of block
0
396-
397 notify_setup();-
398-
399 max_fd = (((
((connection_i...nnection_out))Description
TRUEnever evaluated
FALSEnever evaluated
connection_in) > (connection_out))
((connection_i...nnection_out))Description
TRUEnever evaluated
FALSEnever evaluated
? (connection_in) : (connection_out));
0
400 max_fd = (((
((max_fd) > (notify_pipe[0]))Description
TRUEnever evaluated
FALSEnever evaluated
max_fd) > (notify_pipe[0]))
((max_fd) > (notify_pipe[0]))Description
TRUEnever evaluated
FALSEnever evaluated
? (max_fd) : (notify_pipe[0]));
0
401-
402 server_init_dispatch();-
403-
404 for (;;) {-
405 process_buffered_input_packets(ssh);-
406-
407 if (!ssh_packet_is_rekeying(ssh)
!ssh_packet_is_rekeying(ssh)Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
408 ssh_packet_not_very_much_data_to_write(active_state)
ssh_packet_not...(active_state)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
409 channel_output_poll(ssh);
never executed: channel_output_poll(ssh);
0
410 if (options.rekey_interval > 0
options.rekey_interval > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& !ssh_packet_is_rekeying(ssh)
!ssh_packet_is_rekeying(ssh)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
411 rekey_timeout_ms = ssh_packet_get_rekey_timeout(active_state) * 1000;
never executed: rekey_timeout_ms = ssh_packet_get_rekey_timeout(active_state) * 1000;
0
412 else-
413 rekey_timeout_ms = 0;
never executed: rekey_timeout_ms = 0;
0
414-
415 wait_until_can_do_something(ssh, connection_in, connection_out,-
416 &readset, &writeset, &max_fd, &nalloc, rekey_timeout_ms);-
417-
418 if (received_sigterm
received_sigtermDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
419 logit("Exiting on signal %d", (int)received_sigterm);-
420-
421 cleanup_exit(255);-
422 }
never executed: end of block
0
423-
424 collect_children(ssh);-
425 if (!ssh_packet_is_rekeying(ssh)
!ssh_packet_is_rekeying(ssh)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
426 channel_after_select(ssh, readset, writeset);
never executed: channel_after_select(ssh, readset, writeset);
0
427 if (process_input(ssh, readset, connection_in) < 0
process_input(...ection_in) < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
428 break;
never executed: break;
0
429 process_output(writeset, connection_out);-
430 }
never executed: end of block
0
431 collect_children(ssh);-
432-
433 free(readset);-
434 free(writeset);-
435-
436-
437 channel_free_all(ssh);-
438-
439-
440 session_destroy_all(ssh, -
441 ((void *)0)-
442 );-
443}
never executed: end of block
0
444-
445static int-
446server_input_keep_alive(int type, u_int32_t seq, struct ssh *ssh)-
447{-
448 debug("Got %d/%u for keepalive", type, seq);-
449-
450-
451-
452-
453-
454 ssh_packet_set_alive_timeouts(active_state, (0));-
455 return
never executed: return 0;
0;
never executed: return 0;
0
456}-
457-
458static Channel *-
459server_request_direct_tcpip(struct ssh *ssh, int *reason, const char **errmsg)-
460{-
461 Channel *c = -
462 ((void *)0)-
463 ;-
464 char *target, *originator;-
465 u_short target_port, originator_port;-
466-
467 target = ssh_packet_get_string(active_state, (-
468 ((void *)0)-
469 ));-
470 target_port = packet_get_int();-
471 originator = ssh_packet_get_string(active_state, (-
472 ((void *)0)-
473 ));-
474 originator_port = packet_get_int();-
475 do { int _len = ssh_packet_remaining(active_state); if (_len > 0
_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
) { logit("Packet integrity error (%d bytes remaining) at %s:%d", _len ,__FILE__, 469); ssh_packet_disconnect(active_state, "Packet integrity error."); }
never executed: end of block
} while (0);
0
476-
477 debug("%s: originator %s port %d, target %s port %d", __func__,-
478 originator, originator_port, target, target_port);-
479-
480-
481 if ((
(options.allow...& (1<<1)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
options.allow_tcp_forwarding & (1<<1)) != 0
(options.allow...& (1<<1)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
482 auth_opts->permit_port_forwarding_flag
auth_opts->per...orwarding_flagDescription
TRUEnever evaluated
FALSEnever evaluated
&&
0
483 !options.disable_forwarding
!options.disable_forwardingDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
484 c = channel_connect_to_port(ssh, target, target_port,-
485 "direct-tcpip", "direct-tcpip", reason, errmsg);-
486 }
never executed: end of block
else {
0
487 logit("refused local port forward: "-
488 "originator %s port %d, target %s port %d",-
489 originator, originator_port, target, target_port);-
490 if (reason !=
reason != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
491 ((void *)0)
reason != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
492 )-
493 *
never executed: *reason = 1;
reason = 1;
never executed: *reason = 1;
0
494 }
never executed: end of block
0
495-
496 free(originator);-
497 free(target);-
498-
499 return
never executed: return c;
c;
never executed: return c;
0
500}-
501-
502static Channel *-
503server_request_direct_streamlocal(struct ssh *ssh)-
504{-
505 Channel *c = -
506 ((void *)0)-
507 ;-
508 char *target, *originator;-
509 u_short originator_port;-
510 struct passwd *pw = the_authctxt->pw;-
511-
512 if (pw ==
pw == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
513 ((void *)0)
pw == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
514 || !the_authctxt->valid
!the_authctxt->validDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
515 fatal("%s: no/invalid user", __func__);
never executed: fatal("%s: no/invalid user", __func__);
0
516-
517 target = ssh_packet_get_string(active_state, (-
518 ((void *)0)-
519 ));-
520 originator = ssh_packet_get_string(active_state, (-
521 ((void *)0)-
522 ));-
523 originator_port = packet_get_int();-
524 do { int _len = ssh_packet_remaining(active_state); if (_len > 0
_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
) { logit("Packet integrity error (%d bytes remaining) at %s:%d", _len ,__FILE__, 508); ssh_packet_disconnect(active_state, "Packet integrity error."); }
never executed: end of block
} while (0);
0
525-
526 debug("%s: originator %s port %d, target %s", __func__,-
527 originator, originator_port, target);-
528-
529-
530 if ((
(options.allow...& (1<<1)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
options.allow_streamlocal_forwarding & (1<<1)) != 0
(options.allow...& (1<<1)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
531 auth_opts->permit_port_forwarding_flag
auth_opts->per...orwarding_flagDescription
TRUEnever evaluated
FALSEnever evaluated
&&
0
532 !options.disable_forwarding
!options.disable_forwardingDescription
TRUEnever evaluated
FALSEnever evaluated
&& (pw->pw_uid == 0
pw->pw_uid == 0Description
TRUEnever evaluated
FALSEnever evaluated
|| use_privsep
use_privsepDescription
TRUEnever evaluated
FALSEnever evaluated
)) {
0
533 c = channel_connect_to_path(ssh, target,-
534 "direct-streamlocal@openssh.com", "direct-streamlocal");-
535 }
never executed: end of block
else {
0
536 logit("refused streamlocal port forward: "-
537 "originator %s port %d, target %s",-
538 originator, originator_port, target);-
539 }
never executed: end of block
0
540-
541 free(originator);-
542 free(target);-
543-
544 return
never executed: return c;
c;
never executed: return c;
0
545}-
546-
547static Channel *-
548server_request_tun(struct ssh *ssh)-
549{-
550 Channel *c = -
551 ((void *)0)-
552 ;-
553 int mode, tun, sock;-
554 char *tmp, *ifname = -
555 ((void *)0)-
556 ;-
557-
558 mode = packet_get_int();-
559 switch (mode) {-
560 case
never executed: case 0x01:
0x01:
never executed: case 0x01:
0
561 case
never executed: case 0x02:
0x02:
never executed: case 0x02:
0
562 break;
never executed: break;
0
563 default
never executed: default:
:
never executed: default:
0
564 packet_send_debug("Unsupported tunnel device mode.");-
565 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
566 ((void *)0)
never executed: return ((void *)0) ;
0
567 ;
never executed: return ((void *)0) ;
0
568 }-
569 if ((
(options.permi...n & mode) == 0Description
TRUEnever evaluated
FALSEnever evaluated
options.permit_tun & mode) == 0
(options.permi...n & mode) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
570 packet_send_debug("Server has rejected tunnel device "-
571 "forwarding");-
572 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
573 ((void *)0)
never executed: return ((void *)0) ;
0
574 ;
never executed: return ((void *)0) ;
0
575 }-
576-
577 tun = packet_get_int();-
578 if (auth_opts->force_tun_device != -1
auth_opts->for...n_device != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
579 if (tun != 0x7fffffff
tun != 0x7fffffffDescription
TRUEnever evaluated
FALSEnever evaluated
&& auth_opts->force_tun_device != tun
auth_opts->for..._device != tunDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
580 goto
never executed: goto done;
done;
never executed: goto done;
0
581 tun = auth_opts->force_tun_device;-
582 }
never executed: end of block
0
583 sock = tun_open(tun, mode, &ifname);-
584 if (sock < 0
sock < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
585 goto
never executed: goto done;
done;
never executed: goto done;
0
586 debug("Tunnel forwarding using interface %s", ifname);-
587-
588 c = channel_new(ssh, "tun", 4, sock, sock, -1,-
589 (64*(32*1024)), (32*1024), 0, "tun", 1);-
590 c->datagram = 1;-
591-
592 if (mode == 0x01
mode == 0x01Description
TRUEnever evaluated
FALSEnever evaluated
)
0
593 channel_register_filter(ssh, c->self, sys_tun_infilter,
never executed: channel_register_filter(ssh, c->self, sys_tun_infilter, sys_tun_outfilter, ((void *)0) , ((void *)0) );
0
594 sys_tun_outfilter,
never executed: channel_register_filter(ssh, c->self, sys_tun_infilter, sys_tun_outfilter, ((void *)0) , ((void *)0) );
0
595 ((void *)0)
never executed: channel_register_filter(ssh, c->self, sys_tun_infilter, sys_tun_outfilter, ((void *)0) , ((void *)0) );
0
596 ,
never executed: channel_register_filter(ssh, c->self, sys_tun_infilter, sys_tun_outfilter, ((void *)0) , ((void *)0) );
0
597 ((void *)0)
never executed: channel_register_filter(ssh, c->self, sys_tun_infilter, sys_tun_outfilter, ((void *)0) , ((void *)0) );
0
598 );
never executed: channel_register_filter(ssh, c->self, sys_tun_infilter, sys_tun_outfilter, ((void *)0) , ((void *)0) );
0
599-
600-
601-
602-
603-
604-
605-
606 tmp = tun_fwd_ifnames;-
607 xasprintf(&tun_fwd_ifnames, "%s%s%s",-
608 tun_fwd_ifnames == -
609 ((void *)0) -
610 ? "" : tun_fwd_ifnames,-
611 tun_fwd_ifnames == -
612 ((void *)0) -
613 ? "" : ",",-
614 ifname);-
615 free(tmp);-
616 free(ifname);-
617-
618 done:
code before this statement never executed: done:
0
619 if (c ==
c == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
620 ((void *)0)
c == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
621 )-
622 packet_send_debug("Failed to open the tunnel device.");
never executed: packet_send_debug("Failed to open the tunnel device.");
0
623 return
never executed: return c;
c;
never executed: return c;
0
624}-
625-
626static Channel *-
627server_request_session(struct ssh *ssh)-
628{-
629 Channel *c;-
630-
631 debug("input_session_request");-
632 do { int _len = ssh_packet_remaining(active_state); if (_len > 0
_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
) { logit("Packet integrity error (%d bytes remaining) at %s:%d", _len ,__FILE__, 598); ssh_packet_disconnect(active_state, "Packet integrity error."); }
never executed: end of block
} while (0);
0
633-
634 if (no_more_sessions
no_more_sessionsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
635 packet_disconnect("Possible attack: attempt to open a session "-
636 "after additional sessions disabled");-
637 }
never executed: end of block
0
638-
639-
640-
641-
642-
643-
644-
645 c = channel_new(ssh, "session", 10,-
646 -1, -1, -1, 0, (32*1024),-
647 0, "server-session", 1);-
648 if (session_open(the_authctxt, c->self) != 1
session_open(t... c->self) != 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
649 debug("session open failed, free channel %d", c->self);-
650 channel_free(ssh, c);-
651 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
652 ((void *)0)
never executed: return ((void *)0) ;
0
653 ;
never executed: return ((void *)0) ;
0
654 }-
655 channel_register_cleanup(ssh, c->self, session_close_by_channel, 0);-
656 return
never executed: return c;
c;
never executed: return c;
0
657}-
658-
659static int-
660server_input_channel_open(int type, u_int32_t seq, struct ssh *ssh)-
661{-
662 Channel *c = -
663 ((void *)0)-
664 ;-
665 char *ctype;-
666 const char *errmsg = -
667 ((void *)0)-
668 ;-
669 int rchan, reason = 2;-
670 u_int rmaxpack, rwindow, len;-
671-
672 ctype = ssh_packet_get_string(active_state, (&len));-
673 rchan = packet_get_int();-
674 rwindow = packet_get_int();-
675 rmaxpack = packet_get_int();-
676-
677 debug("%s: ctype %s rchan %d win %d max %d", __func__,-
678 ctype, rchan, rwindow, rmaxpack);-
679-
680 if (-
681 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
682 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
683 ) && __builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
684 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
685 ) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
686 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
687 ), __s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
688 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
689 ), (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
690 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
691 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
692 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
693 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
694 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
695 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
696 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
697 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
698 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
699 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
700 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
701 ) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
702 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
703 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
704 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
705 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
706 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
707 ) == 1) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
708 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
709 ), __s1_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
710 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
711 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
712 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
713 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
714 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
715 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
716 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
717 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
718 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
719 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
720 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
721 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
722 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
723 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
724 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
725 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
726 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
727 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( ctype ))[3] - __s2[3]);
0
728 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( ctype ))[3] - __s2[3]);
0
729 ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
730 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
731 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
732 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
733 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
734 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
735 ) == 1) && (__s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
736 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
737 ), __s2_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
738 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
739 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
740 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
741 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
742 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
743 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
744 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
745 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
746 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
747 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
748 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
749 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
750 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
751 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
752 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
753 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
754 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
755 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( "session" ))[3] - __s2[3]);
0
756 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( "session" ))[3] - __s2[3]);
0
757 ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
758 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
759 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
760 "session"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
761 )))); })
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
762 == 0
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
763 c = server_request_session(ssh);-
764 }
never executed: end of block
else if (
0
765 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
766 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
767 ) && __builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
768 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
769 ) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
770 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
771 ), __s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
772 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
773 ), (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
774 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
775 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
776 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
777 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
778 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
779 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
780 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
781 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
782 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
783 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
784 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
785 ) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
786 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
787 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
788 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
789 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
790 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
791 ) == 1) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
792 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
793 ), __s1_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
794 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
795 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
796 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
797 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
798 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
799 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
800 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
801 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
802 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
803 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
804 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
805 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
806 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
807 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
808 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
809 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
810 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
811 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( ctype ))[3] - __s2[3]);
0
812 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( ctype ))[3] - __s2[3]);
0
813 ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
814 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
815 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
816 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
817 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
818 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
819 ) == 1) && (__s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
820 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
821 ), __s2_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
822 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
823 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
824 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
825 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
826 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
827 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
828 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
829 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
830 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
831 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
832 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
833 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
834 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
835 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
836 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
837 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
838 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
839 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( "direct-tcpip" ))[3] - __s2[3]);
0
840 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( "direct-tcpip" ))[3] - __s2[3]);
0
841 ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
842 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
843 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
844 "direct-tcpip"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
845 )))); })
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
846 == 0
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
847 c = server_request_direct_tcpip(ssh, &reason, &errmsg);-
848 }
never executed: end of block
else if (
0
849 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
850 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
851 ) && __builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
852 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
853 ) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
854 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
855 ), __s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
856 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
857 ), (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
858 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
859 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
860 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
861 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
862 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
863 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
864 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
865 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
866 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
867 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
868 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
869 ) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
870 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
871 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
872 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
873 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
874 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
875 ) == 1) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
876 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
877 ), __s1_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
878 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
879 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
880 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
881 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
882 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
883 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
884 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
885 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
886 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
887 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
888 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
889 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
890 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
891 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
892 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
893 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
894 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
895 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( ctype ))[3] - __s2[3]);
0
896 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( ctype ))[3] - __s2[3]);
0
897 ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
898 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
899 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
900 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
901 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
902 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
903 ) == 1) && (__s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
904 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
905 ), __s2_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
906 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
907 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
908 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
909 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
910 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
911 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
912 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
913 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
914 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
915 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
916 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
917 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
918 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
919 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
920 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
921 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
922 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
923 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( "direct-streamlocal@openssh.com" ))[3] - __s2[3]);
0
924 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( "direct-streamlocal@openssh.com" ))[3] - __s2[3]);
0
925 ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
926 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
927 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
928 "direct-streamlocal@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
929 )))); })
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
930 == 0
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
931 c = server_request_direct_streamlocal(ssh);-
932 }
never executed: end of block
else if (
0
933 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
934 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
935 ) && __builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
936 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
937 ) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
938 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
939 ), __s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
940 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
941 ), (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
942 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
943 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
944 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
945 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
946 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
947 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
948 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
949 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
950 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
951 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
952 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
953 ) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
954 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
955 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
956 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
957 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
958 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
959 ) == 1) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
960 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
961 ), __s1_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
962 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
963 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
964 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
965 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
966 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
967 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
968 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
969 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
970 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
971 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
972 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
973 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
974 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
975 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
976 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
977 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
978 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
979 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( ctype ))[3] - __s2[3]);
0
980 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( ctype ))[3] - __s2[3]);
0
981 ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
982 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
983 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
984 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
985 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
986 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
987 ) == 1) && (__s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
988 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
989 ), __s2_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
990 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
991 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
992 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
993 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
994 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
995 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
996 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
997 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
998 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
999 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1000 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1001 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1002 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1003 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1004 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1005 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1006 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1007 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( "tun@openssh.com" ))[3] - __s2[3]);
0
1008 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( "tun@openssh.com" ))[3] - __s2[3]);
0
1009 ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1010 ctype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1011 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1012 "tun@openssh.com"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1013 )))); })
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1014 == 0
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1015 c = server_request_tun(ssh);-
1016 }
never executed: end of block
0
1017 if (c !=
c != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1018 ((void *)0)
c != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1019 ) {-
1020 debug("%s: confirm %s", __func__, ctype);-
1021 c->remote_id = rchan;-
1022 c->have_remote_id = 1;-
1023 c->remote_window = rwindow;-
1024 c->remote_maxpacket = rmaxpack;-
1025 if (c->type != 12
c->type != 12Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1026 ssh_packet_start(active_state, (91));-
1027 ssh_packet_put_int(active_state, (c->remote_id));-
1028 ssh_packet_put_int(active_state, (c->self));-
1029 ssh_packet_put_int(active_state, (c->local_window));-
1030 ssh_packet_put_int(active_state, (c->local_maxpacket));-
1031 ssh_packet_send(active_state);-
1032 }
never executed: end of block
0
1033 }
never executed: end of block
else {
0
1034 debug("%s: failure %s", __func__, ctype);-
1035 ssh_packet_start(active_state, (92));-
1036 ssh_packet_put_int(active_state, (rchan));-
1037 ssh_packet_put_int(active_state, (reason));-
1038 ssh_packet_put_cstring(active_state, (errmsg ? errmsg : "open failed"));-
1039 ssh_packet_put_cstring(active_state, (""));-
1040 ssh_packet_send(active_state);-
1041 }
never executed: end of block
0
1042 free(ctype);-
1043 return
never executed: return 0;
0;
never executed: return 0;
0
1044}-
1045-
1046static int-
1047server_input_hostkeys_prove(struct ssh *ssh, struct sshbuf **respp)-
1048{-
1049 struct sshbuf *resp = -
1050 ((void *)0)-
1051 ;-
1052 struct sshbuf *sigbuf = -
1053 ((void *)0)-
1054 ;-
1055 struct sshkey *key = -
1056 ((void *)0)-
1057 , *key_pub = -
1058 ((void *)0)-
1059 , *key_prv = -
1060 ((void *)0)-
1061 ;-
1062 int r, ndx, kexsigtype, use_kexsigtype, success = 0;-
1063 const u_char *blob;-
1064 u_char *sig = 0;-
1065 size_t blen, slen;-
1066-
1067 if ((
(resp = sshbuf...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
resp = sshbuf_new()) ==
(resp = sshbuf...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1068 ((void *)0)
(resp = sshbuf...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1069 || (
(sigbuf = sshb...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
sigbuf = sshbuf_new()) ==
(sigbuf = sshb...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1070 ((void *)0)
(sigbuf = sshb...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1071 )-
1072 fatal("%s: sshbuf_new", __func__);
never executed: fatal("%s: sshbuf_new", __func__);
0
1073-
1074 kexsigtype = sshkey_type_plain(-
1075 sshkey_type_from_name(ssh->kex->hostkey_alg));-
1076 while (ssh_packet_remaining(ssh) > 0
ssh_packet_remaining(ssh) > 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1077 sshkey_free(key);-
1078 key = -
1079 ((void *)0)-
1080 ;-
1081 if ((
(r = sshpkt_ge..., &blen)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshpkt_get_string_direct(ssh, &blob, &blen)) != 0
(r = sshpkt_ge..., &blen)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
1082 (
(r = sshkey_fr...n, &key)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshkey_from_blob(blob, blen, &key)) != 0
(r = sshkey_fr...n, &key)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1083 error("%s: couldn't parse key: %s",-
1084 __func__, ssh_err(r));-
1085 goto
never executed: goto out;
out;
never executed: goto out;
0
1086 }-
1087-
1088-
1089-
1090-
1091 if ((
(ndx = ssh->ke...1, ssh)) == -1Description
TRUEnever evaluated
FALSEnever evaluated
ndx = ssh->kex->host_key_index(key, 1, ssh)) == -1
(ndx = ssh->ke...1, ssh)) == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1092 error("%s: unknown host %s key",-
1093 __func__, sshkey_type(key));-
1094 goto
never executed: goto out;
out;
never executed: goto out;
0
1095 }-
1096-
1097-
1098-
1099-
1100 if ((
(key_prv = get...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
key_prv = get_hostkey_by_index(ndx)) ==
(key_prv = get...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1101 ((void *)0)
(key_prv = get...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1102 &&-
1103 (
(key_pub = get...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
key_pub = get_hostkey_public_by_index(ndx, ssh)) ==
(key_pub = get...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1104 ((void *)0)
(key_pub = get...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1105 ) {-
1106 error("%s: can't retrieve hostkey %d", __func__, ndx);-
1107 goto
never executed: goto out;
out;
never executed: goto out;
0
1108 }-
1109 sshbuf_reset(sigbuf);-
1110 free(sig);-
1111 sig = -
1112 ((void *)0)-
1113 ;-
1114-
1115-
1116-
1117-
1118 use_kexsigtype = kexsigtype == KEY_RSA
kexsigtype == KEY_RSADescription
TRUEnever evaluated
FALSEnever evaluated
&&
0
1119 sshkey_type_plain(key->type) == KEY_RSA
sshkey_type_pl...pe) == KEY_RSADescription
TRUEnever evaluated
FALSEnever evaluated
;
0
1120 if ((
(r = sshbuf_pu...sh.com")) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshbuf_put_cstring(sigbuf,
(r = sshbuf_pu...sh.com")) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1121 "hostkeys-prove-00@openssh.com")) != 0
(r = sshbuf_pu...sh.com")) != 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
1122 (
(r = sshbuf_pu..._id_len)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshbuf_put_string(sigbuf,
(r = sshbuf_pu..._id_len)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1123 ssh->kex->session_id, ssh->kex->session_id_len)) != 0
(r = sshbuf_pu..._id_len)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
1124 (
(r = sshkey_pu... sigbuf)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshkey_puts(key, sigbuf)) != 0
(r = sshkey_pu... sigbuf)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
1125 (
(r = ssh->kex-...)0) , 0)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = ssh->kex->sign(key_prv, key_pub, &sig, &slen,
(r = ssh->kex-...)0) , 0)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1126 sshbuf_ptr(sigbuf), sshbuf_len(sigbuf),
(r = ssh->kex-...)0) , 0)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1127 use_kexsigtype ? ssh->kex->hostkey_alg :
(r = ssh->kex-...)0) , 0)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1128 ((void *)0)
(r = ssh->kex-...)0) , 0)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1129 , 0)) != 0
(r = ssh->kex-...)0) , 0)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
1130 (
(r = sshbuf_pu...g, slen)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshbuf_put_string(resp, sig, slen)) != 0
(r = sshbuf_pu...g, slen)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1131 error("%s: couldn't prepare signature: %s",-
1132 __func__, ssh_err(r));-
1133 goto
never executed: goto out;
out;
never executed: goto out;
0
1134 }-
1135 }
never executed: end of block
0
1136-
1137 *respp = resp;-
1138 resp = -
1139 ((void *)0)-
1140 ;-
1141 success = 1;-
1142 out:
code before this statement never executed: out:
0
1143 free(sig);-
1144 sshbuf_free(resp);-
1145 sshbuf_free(sigbuf);-
1146 sshkey_free(key);-
1147 return
never executed: return success;
success;
never executed: return success;
0
1148}-
1149-
1150static int-
1151server_input_global_request(int type, u_int32_t seq, struct ssh *ssh)-
1152{-
1153 char *rtype;-
1154 int want_reply;-
1155 int r, success = 0, allocated_listen_port = 0;-
1156 struct sshbuf *resp = -
1157 ((void *)0)-
1158 ;-
1159 struct passwd *pw = the_authctxt->pw;-
1160-
1161 if (pw ==
pw == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1162 ((void *)0)
pw == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1163 || !the_authctxt->valid
!the_authctxt->validDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1164 fatal("%s: no/invalid user", __func__);
never executed: fatal("%s: no/invalid user", __func__);
0
1165-
1166 rtype = ssh_packet_get_string(active_state, (-
1167 ((void *)0)-
1168 ));-
1169 want_reply = packet_get_char();-
1170 debug("%s: rtype %s want_reply %d", __func__, rtype, want_reply);-
1171-
1172-
1173 if (-
1174 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1175 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1176 ) && __builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1177 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1178 ) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1179 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1180 ), __s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1181 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1182 ), (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1183 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1184 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1185 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1186 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1187 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1188 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1189 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1190 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1191 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1192 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1193 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1194 ) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1195 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1196 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1197 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1198 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1199 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1200 ) == 1) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1201 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1202 ), __s1_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1203 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1204 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1205 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1206 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1207 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1208 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1209 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1210 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1211 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1212 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1213 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1214 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1215 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1216 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1217 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1218 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1219 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1220 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( rtype ))[3] - __s2[3]);
0
1221 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( rtype ))[3] - __s2[3]);
0
1222 ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1223 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1224 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1225 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1226 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1227 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1228 ) == 1) && (__s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1229 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1230 ), __s2_len < 4) ? (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1231 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1232 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1233 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1234 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1235 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1236 ) == 1) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1237 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1238 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1239 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1240 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1241 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1242 ); int __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1243 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1244 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1245 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1246 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1247 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1248 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( "tcpip-forward" ))[3] - __s2[3]);
0
1249 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( "tcpip-forward" ))[3] - __s2[3]);
0
1250 ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1251 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1252 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1253 "tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1254 )))); })
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1255 == 0
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1256 struct Forward fwd;-
1257-
1258 memset(&fwd, 0, sizeof(fwd));-
1259 fwd.listen_host = ssh_packet_get_string(active_state, (-
1260 ((void *)0)-
1261 ));-
1262 fwd.listen_port = (u_short)packet_get_int();-
1263 debug("%s: tcpip-forward listen %s port %d", __func__,-
1264 fwd.listen_host, fwd.listen_port);-
1265-
1266-
1267 if ((
(options.allow...ng & (1)) == 0Description
TRUEnever evaluated
FALSEnever evaluated
options.allow_tcp_forwarding & (1)) == 0
(options.allow...ng & (1)) == 0Description
TRUEnever evaluated
FALSEnever evaluated
||
0
1268 !auth_opts->permit_port_forwarding_flag
!auth_opts->pe...orwarding_flagDescription
TRUEnever evaluated
FALSEnever evaluated
||
0
1269 options.disable_forwarding
options.disable_forwardingDescription
TRUEnever evaluated
FALSEnever evaluated
||
0
1270 (!want_reply
!want_replyDescription
TRUEnever evaluated
FALSEnever evaluated
&& fwd.listen_port == 0
fwd.listen_port == 0Description
TRUEnever evaluated
FALSEnever evaluated
) ||
0
1271 (fwd.listen_port != 0
fwd.listen_port != 0Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1272 !bind_permitted(fwd.listen_port, pw->pw_uid)
!bind_permitte...t, pw->pw_uid)Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
1273 success = 0;-
1274 packet_send_debug("Server has disabled port forwarding.");-
1275 }
never executed: end of block
else {
0
1276-
1277 success = channel_setup_remote_fwd_listener(ssh, &fwd,-
1278 &allocated_listen_port, &options.fwd_opts);-
1279 }
never executed: end of block
0
1280 free(fwd.listen_host);-
1281 if ((
(resp = sshbuf...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
resp = sshbuf_new()) ==
(resp = sshbuf...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1282 ((void *)0)
(resp = sshbuf...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1283 )-
1284 fatal("%s: sshbuf_new", __func__);
never executed: fatal("%s: sshbuf_new", __func__);
0
1285 if (allocated_listen_port != 0
allocated_listen_port != 0Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
1286 (
(r = sshbuf_pu...en_port)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
r = sshbuf_put_u32(resp, allocated_listen_port)) != 0
(r = sshbuf_pu...en_port)) != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1287 fatal("%s: sshbuf_put_u32: %s", __func__, ssh_err(r));
never executed: fatal("%s: sshbuf_put_u32: %s", __func__, ssh_err(r));
0
1288 }
never executed: end of block
else if (
0
1289 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1290 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1291 ) && __builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1292 "cancel-tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1293 ) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1294 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1295 ), __s2_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1296 "cancel-tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1297 ), (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1298 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1299 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1300 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1301 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1302 "cancel-tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1303 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1304 "cancel-tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1305 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1306 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1307 ,
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1308 "cancel-tcpip-forward"
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1309 ) : (__builtin_constant_p (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1310 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1311 ) && ((size_t)(const void *)((
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1312 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1313 ) + 1) - (size_t)(const void *)(
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1314 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1315 ) == 1) && (__s1_len = __builtin_strlen (
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1316 rtype
__extension__ ... )))); }) == 0Description
TRUEnever evaluated
FALSEnever evaluated
0
1317