summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-16 01:37:01 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-16 01:37:01 +0000
commit0952c6249d044131ba5b4d9094cb817bda824eaa (patch)
treefcfed59838c77b886900825e61172c51103dbace
parentd526f90f06066e8ca43548a6b114260f02d6e314 (diff)
kill /tmp race
-rw-r--r--sbin/modload/modload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/modload/modload.c b/sbin/modload/modload.c
index 5e7dee9be9e..4aec3c69911 100644
--- a/sbin/modload/modload.c
+++ b/sbin/modload/modload.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: modload.c,v 1.8 1996/08/29 15:17:38 deraadt Exp $ */
+/* $OpenBSD: modload.c,v 1.9 1996/09/16 01:37:00 deraadt Exp $ */
/* $NetBSD: modload.c,v 1.13 1995/05/28 05:21:58 jtc Exp $ */
/*
@@ -257,7 +257,7 @@ main(argc, argv)
entry[strlen(entry) - 2] = '\0'; /* chop off .o */
}
- if((modfd = open(out, O_RDWR | O_CREAT, 0666)) < 0)
+ if((modfd = open(out, O_RDWR | O_EXCL | O_CREAT, 0666)) < 0)
err(1, "creating %s", out);
close(modfd);