diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-09-30 08:03:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-09-30 08:03:40 +0000 |
commit | 9e1b5df23b025c9a506e3ff054890ad8f37fe3ba (patch) | |
tree | 624ec5b8594bd0e4f8a93d1499cb5479f894e148 | |
parent | 11b62d1cb86b9d88bccdb6c22bb75df81adadbfe (diff) |
IPPORT_RESERVED
-rw-r--r-- | usr.bin/ssh/channels.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/readconf.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c index 2d935a31f17..37a58f82ed1 100644 --- a/usr.bin/ssh/channels.c +++ b/usr.bin/ssh/channels.c @@ -16,7 +16,7 @@ arbitrary tcp/ip connections, and the authentication agent connection. */ #include "includes.h" -RCSID("$Id: channels.c,v 1.7 1999/09/30 05:11:29 deraadt Exp $"); +RCSID("$Id: channels.c,v 1.8 1999/09/30 08:03:39 deraadt Exp $"); #include "ssh.h" #include "packet.h" @@ -910,7 +910,7 @@ void channel_input_port_forward_request(int is_root) /* Check that an unprivileged user is not trying to forward a privileged port. */ - if (port < 1024 && !is_root) + if (port < IPPORT_RESERVED && !is_root) packet_disconnect("Requested forwarding of port %d but user is not root.", port); diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c index 5052109d1ab..91cd876705f 100644 --- a/usr.bin/ssh/readconf.c +++ b/usr.bin/ssh/readconf.c @@ -14,7 +14,7 @@ Functions for reading the configuration files. */ #include "includes.h" -RCSID("$Id: readconf.c,v 1.6 1999/09/30 05:03:05 deraadt Exp $"); +RCSID("$Id: readconf.c,v 1.7 1999/09/30 08:03:39 deraadt Exp $"); #include "ssh.h" #include "cipher.h" @@ -163,7 +163,7 @@ void add_local_forward(Options *options, int port, const char *host, extern uid_t original_real_uid; if ((port & 0xffff) != port) fatal("Requested forwarding of nonexistent port %d.", port); - if (port < 1024 && original_real_uid != 0) + if (port < IPPORT_RESERVED && original_real_uid != 0) fatal("Privileged ports can only be forwarded by root.\n"); if (options->num_local_forwards >= SSH_MAX_FORWARDS_PER_DIRECTION) fatal("Too many local forwards (max %d).", SSH_MAX_FORWARDS_PER_DIRECTION); |