summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-07-23 19:27:42 +0000
committerderaadt <deraadt@openbsd.org>1996-07-23 19:27:42 +0000
commit15f6beed328b3dd7dd6eb480ab904c743e9cc868 (patch)
tree8ec3e07ce6843f0c2d69a16bf66dfe335bd7c8a8
parentnicer error message; netbsd pr#2651; enami@ba2.so-net.or.jp (diff)
downloadwireguard-openbsd-15f6beed328b3dd7dd6eb480ab904c743e9cc868.tar.xz
wireguard-openbsd-15f6beed328b3dd7dd6eb480ab904c743e9cc868.zip
require stderr to be > IPPORT_RESERVED/2 (hope this does not break anything...)
-rw-r--r--libexec/rshd/rshd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c
index ce9a3288c8b..f619129b9ad 100644
--- a/libexec/rshd/rshd.c
+++ b/libexec/rshd/rshd.c
@@ -39,7 +39,7 @@ static char copyright[] =
#ifndef lint
/* from: static char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94"; */
-static char *rcsid = "$Id: rshd.c,v 1.5 1996/07/22 01:59:10 deraadt Exp $";
+static char *rcsid = "$Id: rshd.c,v 1.6 1996/07/23 19:27:42 deraadt Exp $";
#endif /* not lint */
/*
@@ -299,7 +299,8 @@ doit(fromp)
#ifdef KERBEROS
if (!use_kerberos)
#endif
- if (port >= IPPORT_RESERVED) {
+ if (port >= IPPORT_RESERVED ||
+ port < IPPORT_RESERVED/2) {
syslog(LOG_ERR, "2nd port not reserved\n");
exit(1);
}