diff options
author | 1996-05-14 18:53:38 +0000 | |
---|---|---|
committer | 1996-05-14 18:53:38 +0000 | |
commit | 430a7d2a4c74dc9219bc3fb46eb4260119e5f43a (patch) | |
tree | 000aeb194983bb0be7aad20d6893b366fe995931 | |
parent | fix NetBSD PR#1176. (diff) | |
download | wireguard-openbsd-430a7d2a4c74dc9219bc3fb46eb4260119e5f43a.tar.xz wireguard-openbsd-430a7d2a4c74dc9219bc3fb46eb4260119e5f43a.zip |
require ypserv to be on reserved port
-rw-r--r-- | usr.sbin/ypbind/ypbind.c | 6 |
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, |