Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl2/xcvs/dist/src - add acl support



details:   https://anonhg.NetBSD.org/src/rev/24118f5fcb75
branches:  trunk
changeset: 777892:24118f5fcb75
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Mar 08 20:45:28 2012 +0000

description:
- add acl support
- document availability of tag commands.

diffstat:

 external/gpl2/xcvs/dist/src/mkmodules.c |  93 ++++++++++++++++++++++++++++++++-
 1 files changed, 91 insertions(+), 2 deletions(-)

diffs (136 lines):

diff -r 2ad3e1d1ee26 -r 24118f5fcb75 external/gpl2/xcvs/dist/src/mkmodules.c
--- a/external/gpl2/xcvs/dist/src/mkmodules.c   Thu Mar 08 20:44:32 2012 +0000
+++ b/external/gpl2/xcvs/dist/src/mkmodules.c   Thu Mar 08 20:45:28 2012 +0000
@@ -28,6 +28,79 @@
 static void write_dbmfile (char *temp);
 #endif                         /* !MY_NDBM */
 
+/* cvsacl patch */
+static const char *const aclconfig_contents[] = {
+       "# Set `UseCVSACL' to yes to use CVSACL feature.\n",
+       "UseCVSACL=yes\n",
+       "\n",
+       "# Default CVSACL Permission to use.\n",
+       "#CVSACLDefaultPermissions=p\n",
+       "\n",
+       "# Default file location for CVS ACL file (access) is CVSROOT/access.\n",
+       "# If you want to use a different location, define it below.\n",
+       "#CVSACLFileLocation=/path/to/cvs/access\n",
+       "\n",
+       "# Set `UseSystemGroups' to yes to use system group definitions (/etc/group).\n",
+       "UseSystemGroups=yes\n",
+       "\n",
+       "# Set `UseCVSGroups' to yes to use another group file.\n",
+       "#UseCVSGroups=yes\n",
+       "\n",
+       "# Default file location for CVS groups file is CVSROOT/group.\n",
+       "# If you want to use a different location, define it below.\n",
+       "#CVSGroupsFileLocation=/path/to/cvs/group\n",
+       "\n",
+       "# Set UseSeperateACLFileForEachDir to yes in order to use a\n",
+       "# seperate 'access' file for each directory.\n",
+       "# This increased the performance if you have really big repository.\n",
+       "#UseSeperateACLFileForEachDir=no\n",
+       "\n",
+       "# If StopAtFirstPermissionDenied is set to yes\n",
+       "# operation will stop at first permission denied message.\n",
+       "# Default is no.\n",
+       "#StopAtFirstPermissionDenied=no\n",
+       "\n",
+       "# Set CVSServerRunAsUser to a system user, in order CVS server\n",
+       "# to run as.\n",
+       "#CVSServerRunAsUser=runascvsuser",
+       NULL
+};
+
+static const char *const access_contents[] = {
+       "# CVS ACL definitions file. DO NOT EDIT MANUALLY\n",
+       "#\n",
+       "# BNF:\n",
+       "#     <entry>:           "
+           "<filetype>:<path>:<tag-branch>:<permission-list>:\n",
+       "#     <filetype>:        d|f\n",
+       "#     <path>:            ALL | unix-file-path\n",
+       "#     <tag-branch>:      ALL | HEAD | name\n",
+       "#     <permission-list>: <permission>\n",
+       "#                        | <permission-list> , <permission>\n",
+       "#     <permission>:      <actor>!<privilege>\n",
+       "#     <actor>:           ALL | user | group\n",
+       "#     <privilege>        n | a | w | t | r | c | d | p\n",
+       "#\n",
+       "# Valid privileges are:\n",
+       "# * - no permission      (n) (1)\n",
+       "# * - all permissions    (a) (2)\n",
+       "# * - write permission   (w) (3)\n",
+       "# * - tag permission     (t) (4)\n",
+       "# * - read permission    (r) (5)\n",
+       "# * - add permission     (c) (6)\n",
+       "# * - remove permission  (d) (7)\n",
+       "# * - permission change  (p) (8)\n",
+       "#\n",
+       "# Valid filetypes are:\n",
+       "# * - plain file (f)\n",
+       "# * - directory  (d)\n",
+       "#\n",
+       NULL
+};
+
+static const char *const group_contents[] = {
+};
+
 /* Structure which describes an administrative file.  */
 struct admin_file {
    /* Name of the file, within the CVSROOT directory.  */
@@ -73,6 +146,7 @@
 #endif
     "#    %p = path relative to repository\n",
     "#    %r = repository (path portion of $CVSROOT)\n",
+    "#    %t = tagname\n",
     "#    %{sVv} = attribute list = file name, old version number (pre-checkin),\n",
     "#           new version number (post-checkin).  When either old or new revision\n",
     "#           is unknown, doesn't exist, or isn't applicable, the string \"NONE\"\n",
@@ -168,6 +242,7 @@
 #endif
     "#    %p = path relative to repository\n",
     "#    %r = repository (path portion of $CVSROOT)\n",
+    "#    %t = tagname\n",
     "#    %{s} = file name, file name, ...\n",
     "#\n",
     "# If no format strings are present in the filter string, a default of\n",
@@ -677,6 +752,20 @@
     {CVSROOTADM_CONFIG,
         "a %s file configures various behaviors",
         config_contents},
+
+     /* cvsacl patch */
+    {CVSROOTADM_ACLCONFIG,
+        "a %s file configures Access Control List behaviors",
+        aclconfig_contents},
+
+    {CVSROOTADM_ACCESS,
+        "a %s file configures Access Control Lists",
+        access_contents},
+
+    {CVSROOTADM_GROUP,
+        "a %s file configures Access Control List group definitions",
+        group_contents},
+
     {NULL, NULL, NULL}
 };
 
@@ -1259,13 +1348,13 @@
        fp = xfopen (info, "w");
        if (fclose (fp) < 0)
            error (1, errno, "cannot close %s", info);
- 
+
         /* Make the new history file world-writeable, since every CVS
            user will need to be able to write to it.  We use chmod()
            because xchmod() is too shy. */
         chmod (info, 0666);
     }
-
+    
     /* Make an empty val-tags file to prevent problems creating it later.  */
     strcpy (info, adm);
     strcat (info, "/");



Home | Main Index | Thread Index | Old Index