summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/rcs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 32a3cd852ac..97e239131f7 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.227 2007/11/08 20:43:42 tobias Exp $ */
+/* $OpenBSD: rcs.c,v 1.228 2007/11/11 09:49:47 tobias Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -252,7 +252,7 @@ RCSFILE *
rcs_open(const char *path, int fd, int flags, ...)
{
int mode;
- mode_t fmode;
+ mode_t fmode, mask;
RCSFILE *rfp;
va_list vap;
struct rcs_delta *rdp;
@@ -268,6 +268,10 @@ rcs_open(const char *path, int fd, int flags, ...)
fmode = (mode_t)mode;
}
+ mask = umask(0);
+ umask(mask);
+ fmode &= ~mask;
+
rfp = xcalloc(1, sizeof(*rfp));
rfp->rf_path = xstrdup(path);