$CVSROOT/CVSROOT/*info files is always world readable.
$CVSUMASK cannot control these permission.
This patch enables cvs to control permissions of *info by $CVSUMASK.
Index: mkmodules.c
===================================================================
RCS file: /home2/cvsroot/ccvs/src/mkmodules.c,v
retrieving revision 1.58
diff -c -r1.58 mkmodules.c
*** mkmodules.c 2000/02/21 16:03:09 1.58
--- mkmodules.c 2000/03/03 07:41:34
***************
*** 544,549 ****
--- 544,550 ----
char *rcs;
RCSNode *rcsnode;
int retcode = 0;
+ mode_t omask;
if (noexec)
return 0;
***************
*** 557,564 ****
--- 558,567 ----
return (1);
}
rcsnode = RCS_parsercsfile (rcs);
+ omask = umask (cvsumask);
retcode = RCS_checkout (rcsnode, NULL, NULL, NULL, NULL, temp,
(RCSCHECKOUTPROC) NULL, (void *) NULL);
+ (void) umask (omask);
if (retcode != 0)
{
/* Probably not necessary (?); RCS_checkout already printed a
***************
*** 779,784 ****
--- 782,788 ----
char *bak;
struct stat statbuf;
char *rcs;
+ int perm = 0444 & ~cvsumask;
/* Set "x" bits if set in original. */
rcs = xmalloc (strlen (real) + sizeof (RCSEXT) + 10);
***************
*** 789,795 ****
error (0, errno, "cannot stat %s", rcs);
free (rcs);
! if (chmod (temp, 0444 | (statbuf.st_mode & 0111)) < 0)
error (0, errno, "warning: cannot chmod %s", temp);
bak = xmalloc (strlen (real) + sizeof (BAKPREFIX) + 10);
(void) sprintf (bak, "%s%s", BAKPREFIX, real);
--- 793,799 ----
error (0, errno, "cannot stat %s", rcs);
free (rcs);
! if (chmod (temp, perm | (statbuf.st_mode & 0111)) < 0)
error (0, errno, "warning: cannot chmod %s", temp);
bak = xmalloc (strlen (real) + sizeof (BAKPREFIX) + 10);
(void) sprintf (bak, "%s%s", BAKPREFIX, real);