=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/channels.c,v retrieving revision 1.191 retrieving revision 1.192 diff -u -r1.191 -r1.192 --- src/usr.bin/ssh/channels.c 2003/06/24 08:23:46 1.191 +++ src/usr.bin/ssh/channels.c 2003/07/02 12:56:34 1.192 @@ -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" @@ -2190,8 +2190,12 @@ * 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."); + /* Initiate forwarding */ channel_setup_local_fwd_listener(port, hostname, host_port, gateway_ports);