summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-04-15 15:18:50 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-04-15 15:18:50 +0000
commitcb0e27195f7685f010628edb287b9993fc42e85a (patch)
tree1b80c1e9398db58cbe98b8ac9c2fe1c0609c8b4f
parent062c1cd9d6f472b3d693973c5e897903dda6ea03 (diff)
for callit, let nop through. rpcinfo -b, ya know; adam@math.tau.ac.il
-rw-r--r--usr.sbin/portmap/portmap.c13
1 files changed, 7 insertions, 6 deletions
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,