temp file. This prevents the server from telling old clients that the checked-out file should be world writeable because the RCS file is world readable. XXX needs to be adapted when post-1.10 versions of CVS are integrated. Bump PKGNAME to 1.10-nb1 to make it clear which version is installed.
24 lines
786 B
Text
24 lines
786 B
Text
$NetBSD: patch-af,v 1.1 1999/01/18 21:11:48 bad Exp $
|
|
|
|
--- src/update.c.orig Thu Jun 25 16:56:50 1998
|
|
+++ src/update.c Mon Jan 18 20:17:08 1999
|
|
@@ -1304,11 +1304,18 @@
|
|
xchmod (finfo->file, 1);
|
|
else
|
|
{
|
|
+ mode_t oumask, writeaccess;
|
|
+
|
|
/* We know that we are the server here, so
|
|
although xchmod checks umask, we don't bother. */
|
|
- mode |= (((mode & S_IRUSR) ? S_IWUSR : 0)
|
|
+ /* Not bothering with the umask makes the files
|
|
+ mode 0777 on old clients, though. -chb */
|
|
+ oumask = umask(0);
|
|
+ (void) umask(oumask);
|
|
+ writeaccess = (((mode & S_IRUSR) ? S_IWUSR : 0)
|
|
| ((mode & S_IRGRP) ? S_IWGRP : 0)
|
|
| ((mode & S_IROTH) ? S_IWOTH : 0));
|
|
+ mode |= (~oumask) & writeaccess;
|
|
}
|
|
}
|
|
|