diff --git a/usr.sbin/ypserv/makedbm/makedbm.c b/usr.sbin/ypserv/makedbm/makedbm.c index bb3697e0c470..eebe0dbdd406 100644 --- a/usr.sbin/ypserv/makedbm/makedbm.c +++ b/usr.sbin/ypserv/makedbm/makedbm.c @@ -1,4 +1,4 @@ -/* $NetBSD: makedbm.c,v 1.1.1.1 1996/08/09 10:14:54 thorpej Exp $ */ +/* $NetBSD: makedbm.c,v 1.2 1997/03/22 03:32:36 lukem Exp $ */ /* * Copyright (c) 1994 Mats O Jansson @@ -272,7 +272,7 @@ create_database(infile, database, yp_input_file, yp_output_file, snprintf(db_mapname, sizeof(db_mapname), "%s%s", db_tempname, YPDB_SUFFIX); - new_db = ypdb_open(db_tempname, O_RDWR | O_CREAT, 0644); + new_db = ypdb_open(db_tempname, O_RDWR | O_CREAT | O_EXCL, 0644); if (new_db == NULL) errx(1, "can't create temp database `%s'", db_tempname); diff --git a/usr.sbin/ypserv/ypxfr/ypxfr.c b/usr.sbin/ypserv/ypxfr/ypxfr.c index 07100c366887..ac1145706067 100644 --- a/usr.sbin/ypserv/ypxfr/ypxfr.c +++ b/usr.sbin/ypserv/ypxfr/ypxfr.c @@ -1,4 +1,4 @@ -/* $NetBSD: ypxfr.c,v 1.2 1996/08/15 22:17:57 chuck Exp $ */ +/* $NetBSD: ypxfr.c,v 1.3 1997/03/22 03:32:40 lukem Exp $ */ /* * Copyright (c) 1994 Mats O Jansson @@ -400,7 +400,7 @@ create_db(domain, map, temp_map) YP_DB_PATH, domain, temp_map); db_temp[sizeof(db_temp) - 1] = '\0'; - db = ypdb_open(db_temp, O_RDWR|O_CREAT, 0444); + db = ypdb_open(db_temp, O_RDWR|O_CREAT|O_EXCL, 0444); return db; }