summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-06-15 04:21:27 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-06-15 04:21:27 +0000
commit2dedb0169f579fa1ad8e7a60732afdbb01581df6 (patch)
tree75e35e1c6a212d457feacdaba7082ad32b9a5bcd
parent3ccd9f3943c50049f4fe38c472f6f8f5ef52a32f (diff)
open the RCS file descriptor with O_RDONLY, like all other code does.
ok tobias@
-rw-r--r--usr.bin/cvs/import.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/import.c b/usr.bin/cvs/import.c
index 5fbb3111ba9..87e139e61ac 100644
--- a/usr.bin/cvs/import.c
+++ b/usr.bin/cvs/import.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: import.c,v 1.96 2008/06/14 04:34:08 tobias Exp $ */
+/* $OpenBSD: import.c,v 1.97 2008/06/15 04:21:26 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -324,7 +324,7 @@ import_new(struct cvs_file *cf)
if ((brev = rcsnum_brtorev(branch)) == NULL)
fatal("import_new: failed to get first branch revision");
- cf->repo_fd = open(cf->file_rpath, O_CREAT|O_TRUNC|O_WRONLY);
+ cf->repo_fd = open(cf->file_rpath, O_CREAT | O_RDONLY);
if (cf->repo_fd < 0)
fatal("import_new: %s: %s", cf->file_rpath, strerror(errno));