From owner-cvs-all Wed Dec 2 14:00:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA10069 for cvs-all-outgoing; Wed, 2 Dec 1998 14:00:18 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA10064; Wed, 2 Dec 1998 14:00:17 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.1/8.9.1) id OAA19221; Wed, 2 Dec 1998 14:00:05 -0800 (PST) (envelope-from dillon) Date: Wed, 2 Dec 1998 14:00:05 -0800 (PST) From: Matthew Dillon Message-Id: <199812022200.OAA19221@apollo.backplane.com> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: proposal: simple cvs mod to handle shared checked-out source trees Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk ( Hmmm, I'm not sure this email made it out. Very odd. In anycase, I'm resending it, this time to cvs-* ). If nobody has any objections to the below proposal/patch, I will commit it later today. -- 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. (Please include original email in any response) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message