From 2dedb0169f579fa1ad8e7a60732afdbb01581df6 Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Sun, 15 Jun 2008 04:21:27 +0000 Subject: open the RCS file descriptor with O_RDONLY, like all other code does. ok tobias@ --- usr.bin/cvs/import.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/cvs/import.c') 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 * @@ -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)); -- cgit v1.2.3