summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-05-14 18:53:38 +0000
committerderaadt <deraadt@openbsd.org>1996-05-14 18:53:38 +0000
commit430a7d2a4c74dc9219bc3fb46eb4260119e5f43a (patch)
tree000aeb194983bb0be7aad20d6893b366fe995931
parentfix NetBSD PR#1176. (diff)
downloadwireguard-openbsd-430a7d2a4c74dc9219bc3fb46eb4260119e5f43a.tar.xz
wireguard-openbsd-430a7d2a4c74dc9219bc3fb46eb4260119e5f43a.zip
require ypserv to be on reserved port
-rw-r--r--usr.sbin/ypbind/ypbind.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c
index c45195a2235..4857f140d52 100644
--- a/usr.sbin/ypbind/ypbind.c
+++ b/usr.sbin/ypbind/ypbind.c
@@ -31,7 +31,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$Id: ypbind.c,v 1.4 1996/05/05 12:37:32 deraadt Exp $";
+static char rcsid[] = "$Id: ypbind.c,v 1.5 1996/05/14 18:53:38 deraadt Exp $";
#endif
#include <sys/param.h>
@@ -832,6 +832,10 @@ int force;
ypbindlist = ypdb;
}
+ /* we do not support sunos 3.0 insecure servers */
+ if (ntohs(raddrp->sin_port) < IPPORT_RESERVED)
+ return;
+
/* soft update, alive */
if (ypdb->dom_alive == 1 && force == 0) {
if (!memcmp(&ypdb->dom_server_addr, raddrp,