From 76a9357e18e95fb9a757d7de62d96811d695472a Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 5 Aug 1996 13:38:55 +0000 Subject: check for port 20 --- lib/libc/yp/yp_bind.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/libc') 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 @@ -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 @@ -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 -- cgit v1.2.3