diff options
author | 2008-03-01 14:40:23 +0000 | |
---|---|---|
committer | 2008-03-01 14:40:23 +0000 | |
commit | 961a9361b4aea1a19111ab88e0b92ae64d792de0 (patch) | |
tree | d6589292adb350392038deac4db3c639197898b6 /usr.bin/cvs/diff3.c | |
parent | regen (diff) | |
download | wireguard-openbsd-961a9361b4aea1a19111ab88e0b92ae64d792de0.tar.xz wireguard-openbsd-961a9361b4aea1a19111ab88e0b92ae64d792de0.zip |
when reopening the file pass the proper mode and reopen it using
O_RDWR instead of O_WRONLY so that when we are in server mode
we do not screw up in cvs_remote_send_file().
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 34f375eddcd..adfb540da98 100644 --- a/usr.bin/cvs/diff3.c +++ b/usr.bin/cvs/diff3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff3.c,v 1.44 2008/02/29 21:43:57 joris Exp $ */ +/* $OpenBSD: diff3.c,v 1.45 2008/03/01 14:40:23 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.44 2008/02/29 21:43:57 joris Exp $"; + "$OpenBSD: diff3.c,v 1.45 2008/03/01 14:40:23 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_CREAT | O_WRONLY | O_TRUNC); + cf->fd = open(cf->file_path, O_CREAT | O_RDWR | O_TRUNC, 0644); if (cf->fd == -1) { fatal("cvs_merge_file: failed to reopen fd for writing: %s", strerror(errno)); |