From: deraadt Date: Tue, 15 Apr 1997 15:18:49 +0000 (+0000) Subject: for callit, let nop through. rpcinfo -b, ya know; adam@math.tau.ac.il X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9d791f75b9a966dc0f1ae6f4380a002f82d57242;p=openbsd for callit, let nop through. rpcinfo -b, ya know; adam@math.tau.ac.il --- diff --git a/usr.sbin/portmap/portmap.c b/usr.sbin/portmap/portmap.c index 4ed3226a2fc..8d183ae2cb5 100644 --- a/usr.sbin/portmap/portmap.c +++ b/usr.sbin/portmap/portmap.c @@ -1,7 +1,7 @@ -/* $OpenBSD: portmap.c,v 1.13 1997/01/17 16:07:27 millert Exp $ */ +/* $OpenBSD: portmap.c,v 1.14 1997/04/15 15:18:49 deraadt Exp $ */ /*- - * Copyright (c) 1996 Theo de Raadt (OpenBSD). All rights reserved. + * Copyright (c) 1996, 1997 Theo de Raadt (OpenBSD). All rights reserved. * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * @@ -44,7 +44,7 @@ char copyright[] = #if 0 static char sccsid[] = "from: @(#)portmap.c 5.4 (Berkeley) 4/19/91"; #else -static char rcsid[] = "$OpenBSD: portmap.c,v 1.13 1997/01/17 16:07:27 millert Exp $"; +static char rcsid[] = "$OpenBSD: portmap.c,v 1.14 1997/04/15 15:18:49 deraadt Exp $"; #endif #endif /* not lint */ @@ -643,6 +643,7 @@ reap() #define YPPROG ((u_long) 100004) #define YPPROC_DOMAIN_NONACK ((u_long) 2) #define MOUNTPROC_MNT ((u_long) 1) +#define XXXPROC_NOP ((u_long) 0) int check_callit(addr, proc, prog, aproc) @@ -651,9 +652,9 @@ check_callit(addr, proc, prog, aproc) u_long prog; u_long aproc; { - if (prog == PMAPPROG || - prog == NFSPROG || - prog == YPXPROG || + if ((prog == PMAPPROG && aproc != XXXPROC_NOP) || + (prog == NFSPROG && aproc != XXXPROC_NOP) || + (prog == YPXPROG && aproc != XXXPROC_NOP) || (prog == MOUNTPROG && aproc == MOUNTPROC_MNT) || (prog == YPPROG && aproc != YPPROC_DOMAIN_NONACK)) { syslog(LOG_WARNING,