Module Name: src
Committed By: christos
Date: Thu Mar 8 20:48:02 UTC 2012
Modified Files:
src/external/gpl2/xcvs/dist/src: diff.c
Log Message:
add acl support
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/diff.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl2/xcvs/dist/src/diff.c
diff -u src/external/gpl2/xcvs/dist/src/diff.c:1.2 src/external/gpl2/xcvs/dist/src/diff.c:1.3
--- src/external/gpl2/xcvs/dist/src/diff.c:1.2 Fri Apr 10 07:20:30 2009
+++ src/external/gpl2/xcvs/dist/src/diff.c Thu Mar 8 15:48:02 2012
@@ -498,6 +498,46 @@ diff_fileproc (void *callerdat, struct f
{
/* Skip all the following checks regarding the user file; we're
not using it. */
+
+/* cvsacl patch */
+#ifdef SERVER_SUPPORT
+ if (use_cvs_acl /* && server_active */)
+ {
+ if (diff_rev1)
+ {
+ if (!access_allowed (NULL, finfo->repository, diff_rev1, 5,
+ NULL, NULL, 1))
+ {
+ if (stop_at_first_permission_denied)
+ error (1, 0, "permission denied for %s",
+ Short_Repository (finfo->repository));
+ else
+ error (0, 0, "permission denied for %s/%s",
+ Short_Repository (finfo->repository),
+ finfo->file);
+
+ return (0);
+ }
+ }
+ if (diff_rev2)
+ {
+ if (!access_allowed (NULL, finfo->repository, diff_rev2, 5,
+ NULL, NULL, 1))
+ {
+ if (stop_at_first_permission_denied)
+ error (1, 0, "permission denied for %s",
+ Short_Repository (finfo->repository));
+ else
+ error (0, 0, "permission denied for %s/%s",
+ Short_Repository (finfo->repository),
+ finfo->file);
+
+ return (0);
+ }
+ }
+ }
+#endif
+
}
else if (vers->vn_user == NULL)
{
@@ -840,6 +880,40 @@ diff_dirproc (void *callerdat, const cha
if (!isdir (dir))
return R_SKIP_ALL;
+/* cvsacl patch */
+#ifdef SERVER_SUPPORT
+ if (use_cvs_acl /* && server_active */)
+ {
+ if (diff_rev1)
+ {
+ if (!access_allowed (NULL, update_dir, diff_rev1, 5, NULL, NULL, 1))
+ {
+ if (stop_at_first_permission_denied)
+ error (1, 0, "permission denied for %s",
+ Short_Repository (update_dir));
+ else
+ error (0, 0, "permission denied for %s/%s",
+ Short_Repository (update_dir), update_dir);
+
+ return (0);
+ }
+ }
+ if (diff_rev2)
+ {
+ if (!access_allowed (NULL, update_dir, diff_rev2, 5, NULL, NULL, 1))
+ {
+ if (stop_at_first_permission_denied)
+ error (1, 0, "permission denied for %s",
+ Short_Repository (update_dir));
+ else
+ error (0, 0, "permission denied for %s/%s",
+ Short_Repository (update_dir), update_dir);
+
+ return (0);
+ }
+ }
+ }
+#endif
if (!quiet)
error (0, 0, "Diffing %s", update_dir);
return R_PROCESS;