summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ypserv/ypserv/ypserv_db.c5
-rw-r--r--usr.sbin/ypserv/ypserv/ypserv_proc.c8
-rw-r--r--usr.sbin/ypserv/ypxfr/ypxfr.c6
3 files changed, 10 insertions, 9 deletions
diff --git a/usr.sbin/ypserv/ypserv/ypserv_db.c b/usr.sbin/ypserv/ypserv/ypserv_db.c
index 2b1ae9ed960..b62c2b1bdbc 100644
--- a/usr.sbin/ypserv/ypserv/ypserv_db.c
+++ b/usr.sbin/ypserv/ypserv/ypserv_db.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypserv_db.c,v 1.13 1997/08/09 23:10:12 maja Exp $ */
+/* $OpenBSD: ypserv_db.c,v 1.14 1998/01/08 22:36:47 maja Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@@ -34,7 +34,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypserv_db.c,v 1.13 1997/08/09 23:10:12 maja Exp $";
+static char rcsid[] = "$OpenBSD: ypserv_db.c,v 1.14 1998/01/08 22:36:47 maja Exp $";
#endif
/*
@@ -263,6 +263,7 @@ ypdb_open_db(domain, map, status, map_info)
CIRCLEQ_REMOVE(&maps, m, mapsq); /* adjust LRU queue */
CIRCLEQ_INSERT_HEAD(&maps, m, mapsq);
*status = YP_TRUE;
+ if (map_info) *map_info = m;
return(m->db);
}
diff --git a/usr.sbin/ypserv/ypserv/ypserv_proc.c b/usr.sbin/ypserv/ypserv/ypserv_proc.c
index 62232366aab..b72f44ce0d0 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.14 1997/09/12 01:44:57 deraadt Exp $ */
+/* $OpenBSD: ypserv_proc.c,v 1.15 1998/01/08 22:36:48 maja 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.14 1997/09/12 01:44:57 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ypserv_proc.c,v 1.15 1998/01/08 22:36:48 maja Exp $";
#endif
#include <rpc/rpc.h>
@@ -186,7 +186,7 @@ bail:
if (secure && (ntohs(caller->sin_port) >= IPPORT_RESERVED)) {
res.stat = YP_YPERR;
} else {
- res = ypdb_get_record(argp->domain,argp->map,argp->key, FALSE);
+ res = ypdb_get_record(argp->domain,argp->map,argp->key, TRUE);
}
#ifdef DEBUG
@@ -720,7 +720,7 @@ bail:
ypdb_get_record(argp->ypmatch_req_domain,
argp->ypmatch_req_map,
argp->ypmatch_req_keydat,
- FALSE);
+ TRUE);
}
#ifdef DEBUG
diff --git a/usr.sbin/ypserv/ypxfr/ypxfr.c b/usr.sbin/ypserv/ypxfr/ypxfr.c
index 9c228584c92..a5b79602cea 100644
--- a/usr.sbin/ypserv/ypxfr/ypxfr.c
+++ b/usr.sbin/ypserv/ypxfr/ypxfr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypxfr.c,v 1.22 1997/07/30 12:07:02 maja Exp $ */
+/* $OpenBSD: ypxfr.c,v 1.23 1998/01/08 22:36:49 maja Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@@ -32,7 +32,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypxfr.c,v 1.22 1997/07/30 12:07:02 maja Exp $";
+static char rcsid[] = "$OpenBSD: ypxfr.c,v 1.23 1998/01/08 22:36:49 maja Exp $";
#endif
#include <sys/types.h>
@@ -340,7 +340,7 @@ DBM *db;
status = yp_match_host(client, domain, map,
k.dptr, k.dsize, &value, &vallen);
- if(status > 0) {
+ if(status == 0 && value) {
v.dptr = value;
v.dsize = vallen;