summaryrefslogtreecommitdiffstats
path: root/channels.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-07-03 05:52:04 +0200
committerDarren Tucker <dtucker@zip.com.au>2003-07-03 05:52:04 +0200
commit9189ff89c3c15f152d8daedb09c4101a96365da4 (patch)
tree9a1752ec22397b948d49dfa7257199f8a681e6a7 /channels.c
parent - markus@cvs.openbsd.org 2003/06/29 12:44:38 (diff)
downloadopenssh-9189ff89c3c15f152d8daedb09c4101a96365da4.tar.xz
openssh-9189ff89c3c15f152d8daedb09c4101a96365da4.zip
- markus@cvs.openbsd.org 2003/07/02 12:56:34
[channels.c] deny dynamic forwarding with -R for v1, too; ok djm@
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c10
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 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.191 2003/06/24 08:23:46 markus Exp $");
+RCSID("$OpenBSD: channels.c,v 1.192 2003/07/02 12:56:34 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -2201,9 +2201,13 @@ channel_input_port_forward_request(int is_root, int gateway_ports)
* privileged port.
*/
if (port < IPPORT_RESERVED && !is_root)
- packet_disconnect("Requested forwarding of port %d but user is not root.",
- port);
+ packet_disconnect(
+ "Requested forwarding of port %d but user is not root.",
+ port);
+ if (host_port == 0)
+ packet_disconnect("Dynamic forwarding denied.");
#endif
+
/* Initiate forwarding */
channel_setup_local_fwd_listener(port, hostname, host_port, gateway_ports);