summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMats O Jansson <maja@cvs.openbsd.org>1997-07-26 12:02:21 +0000
committerMats O Jansson <maja@cvs.openbsd.org>1997-07-26 12:02:21 +0000
commit7ad16ad02702c4c519ef8079908f1f4063830df7 (patch)
tree121970ab60a7e9e3519f843d27e2992e6fb5b33d
parentbbe1343db47d7665ec665b69d2a6cfd8e37f8542 (diff)
bugs killed in NetBSD by thorpej.
-rw-r--r--usr.sbin/ypserv/ypxfr/ypxfr.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/ypserv/ypxfr/ypxfr.c b/usr.sbin/ypserv/ypxfr/ypxfr.c
index 68bd9bab54f..ae39022b9d9 100644
--- a/usr.sbin/ypserv/ypxfr/ypxfr.c
+++ b/usr.sbin/ypserv/ypxfr/ypxfr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypxfr.c,v 1.20 1997/05/22 08:05:30 deraadt Exp $ */
+/* $OpenBSD: ypxfr.c,v 1.21 1997/07/26 12:02:20 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.20 1997/05/22 08:05:30 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ypxfr.c,v 1.21 1997/07/26 12:02:20 maja Exp $";
#endif
#include <sys/types.h>
@@ -51,15 +51,15 @@ static char rcsid[] = "$OpenBSD: ypxfr.c,v 1.20 1997/05/22 08:05:30 deraadt Exp
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-#include <rpcsvc/ypclnt.h>
#include <rpcsvc/yp.h>
+#include <rpcsvc/ypclnt.h>
#include "yplib_host.h"
#include "yplog.h"
#include "ypdb.h"
#include "ypdef.h"
-extern char *__progname;
+extern char *__progname; /* from crt0.o */
DBM *db;
extern bool_t xdr_ypresp_all_seq();
@@ -69,12 +69,12 @@ extern void *ypresp_data;
static int
ypxfr_foreach(status,keystr,keylen,valstr,vallen,data)
-int status,keylen,vallen,*data;
-char *keystr,*valstr;
+int status,keylen,vallen;
+char *keystr,*valstr,*data;
{
datum key,val;
- if (status == 2)
+ if (status == YP_NOMORE)
return(0);
keystr[keylen] = '\0';
@@ -200,7 +200,7 @@ char *domain;
char *map;
char *temp_map;
{
- return ypdb_open_suf(temp_map, O_RDWR, 0444);
+ return ypdb_open_suf(temp_map, O_RDWR|O_CREAT|O_EXCL, 0444);
}
int