summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-05 13:38:55 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-05 13:38:55 +0000
commit76a9357e18e95fb9a757d7de62d96811d695472a (patch)
tree57188bd68b9cc90a2a55586a6e6c3feb7f931e30 /lib/libc
parent43a1678a58050f1b0318dbf6a2ae5ae3791ba84f (diff)
check for port 20
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/yp/yp_bind.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libc/yp/yp_bind.c b/lib/libc/yp/yp_bind.c
index 16865b49d70..a481c07d378 100644
--- a/lib/libc/yp/yp_bind.c
+++ b/lib/libc/yp/yp_bind.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yp_bind.c,v 1.4 1996/07/01 07:09:10 deraadt Exp $ */
+/* $OpenBSD: yp_bind.c,v 1.5 1996/08/05 13:38:54 deraadt Exp $ */
/*
* Copyright (c) 1996 Theo de Raadt <deraadt@theos.com>
@@ -33,7 +33,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: yp_bind.c,v 1.4 1996/07/01 07:09:10 deraadt Exp $";
+static char *rcsid = "$OpenBSD: yp_bind.c,v 1.5 1996/08/05 13:38:54 deraadt Exp $";
#endif
#include <sys/param.h>
@@ -173,7 +173,8 @@ trynet:
free(ysd);
return YPERR_YPBIND;
}
- if (ntohs(clnt_sin.sin_port) >= IPPORT_RESERVED) {
+ if (ntohs(clnt_sin.sin_port) >= IPPORT_RESERVED ||
+ ntohs(clnt_sin.sin_port) == 20) {
/*
* YP was not running, but someone has registered
* ypbind with portmap -- this simply means YP is
@@ -202,7 +203,8 @@ trynet:
gotdata:
bn = &ypbr.ypbind_resp_u.ypbind_bindinfo;
memcpy(&port, &bn->ypbind_binding_port, sizeof port);
- if (ntohs(port) >= IPPORT_RESERVED) {
+ if (ntohs(port) >= IPPORT_RESERVED ||
+ ntohs(port) == 20) {
/*
* This is bullshit -- the ypbind wants me to
* communicate to an insecure ypserv. We are