diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.38 2000/10/11 20:27:23 markus Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.40 2000/10/15 14:14:01 markus Exp $"); |
37 | 37 | ||
38 | #include "xmalloc.h" | 38 | #include "xmalloc.h" |
39 | #include "ssh.h" | 39 | #include "ssh.h" |
@@ -236,7 +236,7 @@ do_authenticated(struct passwd * pw) | |||
236 | * by the client telling us, so we can equally well trust the client | 236 | * by the client telling us, so we can equally well trust the client |
237 | * not to request anything bogus.) | 237 | * not to request anything bogus.) |
238 | */ | 238 | */ |
239 | if (!no_port_forwarding_flag) | 239 | if (!no_port_forwarding_flag && options.allow_tcp_forwarding) |
240 | channel_permit_all_opens(); | 240 | channel_permit_all_opens(); |
241 | 241 | ||
242 | s = session_new(); | 242 | s = session_new(); |
@@ -388,6 +388,10 @@ do_authenticated(struct passwd * pw) | |||
388 | debug("Port forwarding not permitted for this authentication."); | 388 | debug("Port forwarding not permitted for this authentication."); |
389 | break; | 389 | break; |
390 | } | 390 | } |
391 | if (!options.allow_tcp_forwarding) { | ||
392 | debug("Port forwarding not permitted."); | ||
393 | break; | ||
394 | } | ||
391 | debug("Received TCP/IP port forwarding request."); | 395 | debug("Received TCP/IP port forwarding request."); |
392 | channel_input_port_forward_request(pw->pw_uid == 0, options.gateway_ports); | 396 | channel_input_port_forward_request(pw->pw_uid == 0, options.gateway_ports); |
393 | success = 1; | 397 | success = 1; |