diff options
-rw-r--r-- | usr.sbin/ypserv/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/ypserv/yp_dblookup.c | 14 | ||||
-rw-r--r-- | usr.sbin/ypserv/yp_main.c | 4 | ||||
-rw-r--r-- | usr.sbin/ypserv/yp_server.c | 6 |
4 files changed, 16 insertions, 12 deletions
diff --git a/usr.sbin/ypserv/Makefile b/usr.sbin/ypserv/Makefile index 76fe709..937c467 100644 --- a/usr.sbin/ypserv/Makefile +++ b/usr.sbin/ypserv/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.3 1997/11/10 21:22:17 wpaul Exp $ +# $Id: Makefile,v 1.12 1997/11/10 22:17:09 wpaul Exp $ PROG= ypserv SRCS= yp_svc.c yp_server.c yp_dblookup.c yp_dnslookup.c \ @@ -33,7 +33,7 @@ afterinstall: ${.CURDIR}/Makefile.yp \ ${DESTDIR}/var/yp/Makefile.dist ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 \ - ${.CURDIR}/ypinit.sh ${BINDIR}/ypinit + ${.CURDIR}/ypinit.sh ${DESTDIR}/${BINDIR}/ypinit @if [ ! -f ${DESTDIR}/var/yp/Makefile.dist ]; then \ ln -s ${DESTDIR}/var/yp/Makefile.dist \ ${DESTDIR}/var/yp/Makefile; fi diff --git a/usr.sbin/ypserv/yp_dblookup.c b/usr.sbin/ypserv/yp_dblookup.c index 9041c09..b271497 100644 --- a/usr.sbin/ypserv/yp_dblookup.c +++ b/usr.sbin/ypserv/yp_dblookup.c @@ -32,7 +32,7 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: yp_dblookup.c,v 1.1 1997/11/09 20:54:38 wpaul Exp wpaul $"; #endif /* not lint */ #include <db.h> @@ -512,8 +512,8 @@ int yp_get_record(domain,map,key,data,allow) #ifdef DB_CACHE if (qhead.cqh_first->dbptr->size) { - qhead.cqh_first->dbptr->key = key->data; - qhead.cqh_first->dbptr->size = key->size; + qhead.cqh_first->dbptr->key = ""; + qhead.cqh_first->dbptr->size = 0; } #else bcopy((char *)data->data, (char *)&buf, data->size); @@ -679,8 +679,12 @@ ypstat yp_select_map(map, domain, key, allow) keydat *key; int allow; { - yp_currmap_db = yp_open_db_cache(domain, map, key->keydat_val, - key->keydat_len); + if (key == NULL) + yp_currmap_db = yp_open_db_cache(domain, map, NULL, 0); + else + yp_currmap_db = yp_open_db_cache(domain, map, + key->keydat_val, + key->keydat_len); yp_allow_db = allow; return(yp_errno); diff --git a/usr.sbin/ypserv/yp_main.c b/usr.sbin/ypserv/yp_main.c index 6aaa7e3..1b2546d 100644 --- a/usr.sbin/ypserv/yp_main.c +++ b/usr.sbin/ypserv/yp_main.c @@ -32,7 +32,7 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: yp_main.c,v 1.1 1997/11/09 20:54:38 wpaul Exp wpaul $"; #endif /* not lint */ /* @@ -83,7 +83,7 @@ extern int _rpc_dtablesize __P((void)); extern int _rpcsvcstate; /* Set when a request is serviced */ char *progname = "ypserv"; char *yp_dir = _PATH_YP; -int debug = 0; +/*int debug = 0;*/ int do_dns = 0; int resfd; diff --git a/usr.sbin/ypserv/yp_server.c b/usr.sbin/ypserv/yp_server.c index 9927f6b..3b645a8 100644 --- a/usr.sbin/ypserv/yp_server.c +++ b/usr.sbin/ypserv/yp_server.c @@ -33,7 +33,7 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: yp_server.c,v 1.1 1997/11/09 20:54:38 wpaul Exp wpaul $"; #endif /* not lint */ #include "yp.h" @@ -143,7 +143,7 @@ ypproc_match_2_svc(ypreq_key *argp, struct svc_req *rqstp) return (&result); } - if (yp_select_map(argp->map, argp->domain, &argp->key, 1) != YP_TRUE) { + if (yp_select_map(argp->map, argp->domain, NULL, 1) != YP_TRUE) { result.stat = yp_errno; return(&result); } @@ -204,7 +204,7 @@ ypproc_first_2_svc(ypreq_nokey *argp, struct svc_req *rqstp) return (&result); } - if (yp_select_map(argp->map, argp->domain, &result.key, 0) != YP_TRUE) { + if (yp_select_map(argp->map, argp->domain, NULL, 0) != YP_TRUE) { result.stat = yp_errno; return(&result); } |