Date: Wed, 2 Dec 1998 02:25:09 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: freebsd-current@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: simple cvs mod to handle shared checked-out source trees Message-ID: <199812021025.CAA13404@apollo.backplane.com>
next in thread | raw e-mail | index | archive | help
I would like to submit the following new option to CVS for
review. The new option, -g, forces a umask of 00x which is
necessary when multiple users share a common checked-out source tree.
If there are no significant objects, I will commit it.
Note that this is different from multiple users operating out of the
same CVSROOT.
There are several common cases where you might want to have multiple users
sharing a common checked-out source tree. For example, in our management
of DNS records we allow certain staff members to make modifications to
primary zone files. We do not want to have to duplicate the 30,000+ zone
files for each user yet we DO want to keep those files under CVS control.
The same problem occurs in our management of many other portions of our
infrastructure.
In anycase, to use the -g option effective, the user simply creates
a ~/.cvsrc config file containing the line shown below, then runs CVS
commands as per normal.
--- cut here ---
cvs -g
--- cut here ---
The only other way to do it is for the user to set his
umask to, for example, 007. The problem with doing this
is that the user's entire shell session then operates
with that umask, which can be exceedingly dangerous.
But CVS operations can be made group-writeable-safe trivially
simply by being in a private group due by chgrp'ing the
directory structure. Thus, having the cvs program set the
umask (when given the -g option) can be made safe.
(not included below are manual and error message diffs
that also describe the new option).
-Matt
tick:/usr/src/contrib/cvs# diff -c src/LINK/main.c src/main.c
*** src/LINK/main.c Tue Apr 7 16:19:50 1998
--- src/main.c Wed Dec 2 01:59:31 1998
***************
*** 479,485 ****
opterr = 1;
while ((c = getopt_long
! (argc, argv, "+QqrwtnRlvb:T:e:d:Hfz:s:xa", long_options, &option_i
ndex))
!= EOF)
{
switch (c)
--- 479,485 ----
opterr = 1;
while ((c = getopt_long
! (argc, argv, "+QqgrwtnRlvb:T:e:d:Hfz:s:xa", long_options, &option_
index))
!= EOF)
{
switch (c)
***************
*** 511,516 ****
--- 511,522 ----
break;
case 'w':
cvswrite = 1;
+ break;
+ case 'g':
+ /*
+ * full group write perms
+ */
+ umask(umask(077) & 007);
break;
case 't':
Matthew Dillon Engineering, HiWay Technologies, Inc. & BEST Internet
Communications & God knows what else.
<dillon@backplane.com> (Please include original email in any response)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812021025.CAA13404>
