diff options
author | 2008-02-29 21:43:57 +0000 | |
---|---|---|
committer | 2008-02-29 21:43:57 +0000 | |
commit | 801c91ec1523b11cc458769967071df2a2ed2024 (patch) | |
tree | 22c69b9794b7e384aedf08046721e43a7451b0c5 /usr.bin/cvs/diff3.c | |
parent | mention moscom in the synopsis section; ok jmc (diff) | |
download | wireguard-openbsd-801c91ec1523b11cc458769967071df2a2ed2024.tar.xz wireguard-openbsd-801c91ec1523b11cc458769967071df2a2ed2024.zip |
handle file permissions and owners properly.
matches what gnu cvs does.
fixes the fact that we couldnt update group writable files.
problem report & diff testing by David Crawshaw.
Diffstat (limited to 'usr.bin/cvs/diff3.c')
-rw-r--r-- | usr.bin/cvs/diff3.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cvs/diff3.c b/usr.bin/cvs/diff3.c index 117d0fbc061..34f375eddcd 100644 --- a/usr.bin/cvs/diff3.c +++ b/usr.bin/cvs/diff3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff3.c,v 1.43 2008/02/28 20:35:27 joris Exp $ */ +/* $OpenBSD: diff3.c,v 1.44 2008/02/29 21:43:57 joris Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -72,7 +72,7 @@ static const char copyright[] = #ifndef lint static const char rcsid[] = - "$OpenBSD: diff3.c,v 1.43 2008/02/28 20:35:27 joris Exp $"; + "$OpenBSD: diff3.c,v 1.44 2008/02/29 21:43:57 joris Exp $"; #endif /* not lint */ #include <ctype.h> @@ -247,7 +247,7 @@ cvs_merge_file(struct cvs_file *cf, int verbose) } (void)close(cf->fd); - cf->fd = open(cf->file_path, O_WRONLY | O_TRUNC); + cf->fd = open(cf->file_path, O_CREAT | O_WRONLY | O_TRUNC); if (cf->fd == -1) { fatal("cvs_merge_file: failed to reopen fd for writing: %s", strerror(errno)); |