Reviewed by: "Jordan K. Hubbard" <jkh@zippy.cdrom.com>, cvs-all@freebsd.org

Add '-g' main option to cvs to better support shared-group access
    to a common checked-out *working* set by multiple users.  See manual
    page for details.
This commit is contained in:
Matthew Dillon 1998-12-03 07:22:44 +00:00
parent 97aa1043ac
commit da1852b35a
2 changed files with 28 additions and 1 deletions

View File

@ -244,6 +244,25 @@ Overrides the setting of the
.SM CVSREAD
environment variable.
.TP
.B \-g
Forces group-write perms on working files. This option is typically
used when you have multiple users sharing a single checked out source
tree, allowing them to operate their shells with a less dangerous umask.
To use this feature, create a directory to hold the checked-out source
tree, set it to a private group, and set up the directory such that
files created under it inherit the group id of the directory. This occurs
automatically with FreeBSD. With SysV you must typically set the SGID bit
on the directory. The users who are to share the checked out tree must
be placed in that group. Note that the sharing of a single checked-out
source tree is very different from giving several users access to a common
CVS repository. Access to a common CVS repository already maintains shared
group-write perms and does not require this option.
To use the option transparently, simply place the line 'cvs -g' in your
~/.cvsrc file. Doing this is not recommended unless you firewall all your
source checkouts within a private group or within a private mode 0700
directory.
.TP
.B \-x
Encrypt all communication between the client and the server. As of
this writing, this is only implemented when using a Kerberos

View File

@ -211,6 +211,7 @@ static const char *const opt_usage[] =
" -q Cause CVS to be somewhat quiet.\n",
" -r Make checked-out files read-only.\n",
" -w Make checked-out files read-write (default).\n",
" -g Force group-write perms on checked-out files.\n",
" -l Turn history logging off.\n",
" -n Do not execute anything that will change the disk.\n",
" -t Show trace of program execution -- try with -n.\n",
@ -480,7 +481,7 @@ main (argc, argv)
opterr = 1;
while ((c = getopt_long
(argc, argv, "+QqrwtnRlvb:T:e:d:Hfz:s:xaU", long_options, &option_index))
(argc, argv, "+QqgrwtnRlvb:T:e:d:Hfz:s:xaU", long_options, &option_index))
!= EOF)
{
switch (c)
@ -513,6 +514,13 @@ main (argc, argv)
case 'w':
cvswrite = 1;
break;
case 'g':
/*
* force full group write perms (used for shared checked-out
* source trees, see manual page)
*/
umask(mask(077) & 007);
break;
case 't':
trace = 1;
break;