summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/rcs.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2008-03-08 20:52:37 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2008-03-08 20:52:37 +0000
commit83eca1302d993efc79b525aa8958bbd400fb5eaf (patch)
treec9a9cd888eb49e12e5ae443f546b3e6ddd453e56 /usr.bin/cvs/rcs.c
parentf180fa31bef240be9e356681d7f12aa11cec5f8b (diff)
Set umask (and cvs_umask) to system's umask in local and client mode.
Also zap umask(0);umask(mask); calls, we have cvs_umask for this. ok joris
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r--usr.bin/cvs/rcs.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index afbf38e4e7e..968e2b373a4 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.258 2008/03/08 20:26:34 joris Exp $ */
+/* $OpenBSD: rcs.c,v 1.259 2008/03/08 20:52:36 tobias Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -241,7 +241,7 @@ RCSFILE *
rcs_open(const char *path, int fd, int flags, ...)
{
int mode;
- mode_t fmode, mask;
+ mode_t fmode;
RCSFILE *rfp;
va_list vap;
struct rcs_delta *rdp;
@@ -257,9 +257,7 @@ rcs_open(const char *path, int fd, int flags, ...)
fmode = (mode_t)mode;
}
- mask = umask(0);
- umask(mask);
- fmode &= ~mask;
+ fmode &= ~cvs_umask;
rfp = xcalloc(1, sizeof(*rfp));