summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authordm <dm@cvs.openbsd.org>1997-06-02 19:50:43 +0000
committerdm <dm@cvs.openbsd.org>1997-06-02 19:50:43 +0000
commit28ff51cc5edb4c4ca4af3cf82cf1ce812f3dabc9 (patch)
treeedbbdd4854194c4462c8e397a1e46daf87f685a8 /usr.sbin
parent1e55774cd14f14a5302ab1855d0bbc4281d6a71d (diff)
Fix for amd: make yp_order return YP_NOMAP for maps with '/' in them.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ypserv/ypserv/ypserv_proc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ypserv/ypserv/ypserv_proc.c b/usr.sbin/ypserv/ypserv/ypserv_proc.c
index 91e94a72fdc..af2d68f83e6 100644
--- a/usr.sbin/ypserv/ypserv/ypserv_proc.c
+++ b/usr.sbin/ypserv/ypserv/ypserv_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypserv_proc.c,v 1.12 1997/04/12 16:38:06 deraadt Exp $ */
+/* $OpenBSD: ypserv_proc.c,v 1.13 1997/06/02 19:50:42 dm Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@@ -32,7 +32,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypserv_proc.c,v 1.12 1997/04/12 16:38:06 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ypserv_proc.c,v 1.13 1997/06/02 19:50:42 dm Exp $";
#endif
#include <rpc/rpc.h>
@@ -471,7 +471,7 @@ ypproc_order_2_svc(argp, rqstp)
int ok = acl_check_host(&caller->sin_addr);
int secure = ypdb_secure(argp->domain,argp->map);
- if (strchr(argp->domain, '/') || strchr(argp->map, '/'))
+ if (strchr(argp->domain, '/'))
goto bail;
YPLOG( "order_2: caller=[%s].%d, auth_ok=%s, secure=%s, domain=%s, map=%s",
inet_ntoa(caller->sin_addr), ntohs(caller->sin_port),
@@ -485,6 +485,8 @@ bail:
if (secure && (ntohs(caller->sin_port) >= IPPORT_RESERVED)) {
res.stat = YP_YPERR;
+ } else if (strchr(argp->map, '/')) {
+ res.stat = YP_NOMAP;
} else {
res = ypdb_get_order(argp->domain,argp->map);
}