diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/channels.c b/channels.c index 04ef6575c..ce07db5c0 100644 --- a/channels.c +++ b/channels.c | |||
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: channels.c,v 1.191 2003/06/24 08:23:46 markus Exp $"); | 42 | RCSID("$OpenBSD: channels.c,v 1.192 2003/07/02 12:56:34 markus Exp $"); |
43 | 43 | ||
44 | #include "ssh.h" | 44 | #include "ssh.h" |
45 | #include "ssh1.h" | 45 | #include "ssh1.h" |
@@ -2201,9 +2201,13 @@ channel_input_port_forward_request(int is_root, int gateway_ports) | |||
2201 | * privileged port. | 2201 | * privileged port. |
2202 | */ | 2202 | */ |
2203 | if (port < IPPORT_RESERVED && !is_root) | 2203 | if (port < IPPORT_RESERVED && !is_root) |
2204 | packet_disconnect("Requested forwarding of port %d but user is not root.", | 2204 | packet_disconnect( |
2205 | port); | 2205 | "Requested forwarding of port %d but user is not root.", |
2206 | port); | ||
2207 | if (host_port == 0) | ||
2208 | packet_disconnect("Dynamic forwarding denied."); | ||
2206 | #endif | 2209 | #endif |
2210 | |||
2207 | /* Initiate forwarding */ | 2211 | /* Initiate forwarding */ |
2208 | channel_setup_local_fwd_listener(port, hostname, host_port, gateway_ports); | 2212 | channel_setup_local_fwd_listener(port, hostname, host_port, gateway_ports); |
2209 | 2213 | ||