diff options
author | dillon <dillon@FreeBSD.org> | 1998-12-03 07:22:44 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1998-12-03 07:22:44 +0000 |
commit | 32e8f491a895ba38df82f5796205769c4b43f227 (patch) | |
tree | 3c60263214bb8676aa8370eeac938339879f90b6 /contrib/cvs | |
parent | 1ece6223beca47ef2d686a5813d2ac2f4d776898 (diff) | |
download | FreeBSD-src-32e8f491a895ba38df82f5796205769c4b43f227.zip FreeBSD-src-32e8f491a895ba38df82f5796205769c4b43f227.tar.gz |
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.
Diffstat (limited to 'contrib/cvs')
-rw-r--r-- | contrib/cvs/man/cvs.1 | 19 | ||||
-rw-r--r-- | contrib/cvs/src/main.c | 10 |
2 files changed, 28 insertions, 1 deletions
diff --git a/contrib/cvs/man/cvs.1 b/contrib/cvs/man/cvs.1 index f3e453f..bbcc569 100644 --- a/contrib/cvs/man/cvs.1 +++ b/contrib/cvs/man/cvs.1 @@ -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 diff --git a/contrib/cvs/src/main.c b/contrib/cvs/src/main.c index 8136f5f..5eb22bc 100644 --- a/contrib/cvs/src/main.c +++ b/contrib/cvs/src/main.c @@ -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; |