diff options
author | 2007-11-11 09:49:47 +0000 | |
---|---|---|
committer | 2007-11-11 09:49:47 +0000 | |
commit | 22ab9685ab71fb30462ad711dc516bee6ef12a99 (patch) | |
tree | b7d05b22e3f94281600368490e2ab5efa16aa234 | |
parent | tidy up the hardware list a little; ok ajacoutot (diff) | |
download | wireguard-openbsd-22ab9685ab71fb30462ad711dc516bee6ef12a99.tar.xz wireguard-openbsd-22ab9685ab71fb30462ad711dc516bee6ef12a99.zip |
Apply umask on RCS file modes. The umask can be changed in CVSROOT/config
and should therefore be handled.
-rw-r--r-- | usr.bin/cvs/rcs.c | 8 |
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); |