Thu Mar 8 20:41:20 2012 UTC ()
Add cvs acl support


(christos)
diff -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/status.c

cvs diff -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/status.c (expand / switch to unified diff)

--- src/external/gpl2/xcvs/dist/src/status.c 2009/04/10 11:20:30 1.2
+++ src/external/gpl2/xcvs/dist/src/status.c 2012/03/08 20:41:20 1.3
@@ -117,26 +117,46 @@ cvsstatus (int argc, char **argv) @@ -117,26 +117,46 @@ cvsstatus (int argc, char **argv)
117/* 117/*
118 * display the status of a file 118 * display the status of a file
119 */ 119 */
120/* ARGSUSED */ 120/* ARGSUSED */
121static int 121static int
122status_fileproc (void *callerdat, struct file_info *finfo) 122status_fileproc (void *callerdat, struct file_info *finfo)
123{ 123{
124 Ctype status; 124 Ctype status;
125 char *sstat; 125 char *sstat;
126 Vers_TS *vers; 126 Vers_TS *vers;
127 Node *node; 127 Node *node;
128 128
129 status = Classify_File (finfo, NULL, NULL, NULL, 1, 0, &vers, 0); 129 status = Classify_File (finfo, NULL, NULL, NULL, 1, 0, &vers, 0);
 130
 131/* cvsacl patch */
 132#ifdef SERVER_SUPPORT
 133 if (use_cvs_acl /* && server_active */)
 134 {
 135 if (!access_allowed (finfo->file, finfo->repository, vers->tag, 5,
 136 NULL, NULL, 1))
 137 {
 138 if (stop_at_first_permission_denied)
 139 error (1, 0, "permission denied for %s",
 140 Short_Repository (finfo->repository));
 141 else
 142 error (0, 0, "permission denied for %s/%s",
 143 Short_Repository (finfo->repository), finfo->file);
 144
 145 return (0);
 146 }
 147 }
 148#endif
 149
130 sstat = "Classify Error"; 150 sstat = "Classify Error";
131 switch (status) 151 switch (status)
132 { 152 {
133 case T_UNKNOWN: 153 case T_UNKNOWN:
134 sstat = "Unknown"; 154 sstat = "Unknown";
135 break; 155 break;
136 case T_CHECKOUT: 156 case T_CHECKOUT:
137 sstat = "Needs Checkout"; 157 sstat = "Needs Checkout";
138 break; 158 break;
139 case T_PATCH: 159 case T_PATCH:
140 sstat = "Needs Patch"; 160 sstat = "Needs Patch";
141 break; 161 break;
142 case T_CONFLICT: 162 case T_CONFLICT: