summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/client.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2007-11-11 09:51:50 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2007-11-11 09:51:50 +0000
commit529798f31b2b7dccb5b8955d05093124e8e43d2a (patch)
tree7cf77b8d595dcda347235becccdf582d3bbf17a5 /usr.bin/cvs/client.c
parentb28bae4ac002be854352bfbf8d8aacd99feb6900 (diff)
If a file has modifications in it (i.e. cvs update on modified files),
reapply umask as done with unmodified files. Sticks at GNU cvs behaviour.
Diffstat (limited to 'usr.bin/cvs/client.c')
-rw-r--r--usr.bin/cvs/client.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c
index 701ecefa7a7..f5904142526 100644
--- a/usr.bin/cvs/client.c
+++ b/usr.bin/cvs/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.82 2007/10/07 18:12:48 chl Exp $ */
+/* $OpenBSD: client.c,v 1.83 2007/11/11 09:51:49 tobias Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -725,7 +725,7 @@ cvs_client_merged(char *data)
{
int fd;
time_t now;
- mode_t fmode;
+ mode_t fmode, mask;
size_t flen;
CVSENTRIES *ent;
const char *errstr;
@@ -763,6 +763,9 @@ cvs_client_merged(char *data)
cvs_strtomode(mode, &fmode);
xfree(mode);
+ mask = umask(0);
+ umask(mask);
+ fmode &= ~mask;
time(&now);
asctime_r(gmtime(&now), timebuf);