summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2009-09-09 11:07:28 +1000
committerDamien Miller <djm@mindrot.org>2009-09-09 11:07:28 +1000
commite5d5a17fe16b5bb22259cb84ef13cd47e60d77d7 (patch)
tree7ab8afd7716986a88153485645b363e9a89ea469
parentdad48e7a96385f8a1bdadd9196e00cefa2a9b702 (diff)
- (djm) [serverloop.c] Fix test for server-assigned remote forwarding port
(-R 0:...); bz#1578, spotted and fix by gavin AT emf.net; ok dtucker@
-rw-r--r--ChangeLog4
-rw-r--r--serverloop.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b692efad..dcb471b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20090908
+ - (djm) [serverloop.c] Fix test for server-assigned remote forwarding port
+ (-R 0:...); bz#1578, spotted and fix by gavin AT emf.net; ok dtucker@
+
20090901
- (dtucker) [configure.ac] Bug #1639: use AC_PATH_PROG to search the path for
krb5-config if it's not in the location specified by --with-kerberos5.
diff --git a/serverloop.c b/serverloop.c
index d8cb54bc..8be01c5c 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1124,7 +1124,8 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
no_port_forwarding_flag ||
(!want_reply && listen_port == 0)
#ifndef NO_IPPORT_RESERVED_CONCEPT
- || (listen_port < IPPORT_RESERVED && pw->pw_uid != 0)
+ || (listen_port != 0 && listen_port < IPPORT_RESERVED &&
+ pw->pw_uid != 0)
#endif
) {
success = 0;