- (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@
This commit is contained in:
Damien Miller 2009-09-09 11:07:28 +10:00
parent dad48e7a96
commit e5d5a17fe1
2 changed files with 6 additions and 1 deletions

View File

@ -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 20090901
- (dtucker) [configure.ac] Bug #1639: use AC_PATH_PROG to search the path for - (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. krb5-config if it's not in the location specified by --with-kerberos5.

View File

@ -1124,7 +1124,8 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt)
no_port_forwarding_flag || no_port_forwarding_flag ||
(!want_reply && listen_port == 0) (!want_reply && listen_port == 0)
#ifndef NO_IPPORT_RESERVED_CONCEPT #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 #endif
) { ) {
success = 0; success = 0;