Module Name:    src
Committed By:   christos
Date:           Thu Mar  8 20:33:02 UTC 2012

Modified Files:
        src/external/gpl2/xcvs/dist/src: update.c

Log Message:
- acl support
- check chdir return


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/update.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/update.c
diff -u src/external/gpl2/xcvs/dist/src/update.c:1.3 src/external/gpl2/xcvs/dist/src/update.c:1.4
--- src/external/gpl2/xcvs/dist/src/update.c:1.3	Fri Apr 10 07:20:30 2009
+++ src/external/gpl2/xcvs/dist/src/update.c	Thu Mar  8 15:33:02 2012
@@ -596,6 +596,25 @@ update_fileproc (void *callerdat, struct
     status = Classify_File (finfo, tag, date, options, force_tag_match,
 			    aflag, &vers, pipeout);
 
+/* cvsacl patch */
+#ifdef SERVER_SUPPORT
+    if (use_cvs_acl /* && server_active */)
+    {
+	if (!access_allowed (finfo->file, finfo->repository, vers->tag, 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
+
     /* Keep track of whether TAG is a branch tag.
        Note that if it is a branch tag in some files and a nonbranch tag
        in others, treat it as a nonbranch tag.  */
@@ -1039,7 +1058,8 @@ update_dirleave_proc (void *callerdat, c
     {
 	/* FIXME: chdir ("..") loses with symlinks.  */
 	/* Prune empty dirs on the way out - if necessary */
-	(void) CVS_CHDIR ("..");
+	if (CVS_CHDIR ("..") == -1)
+	    error (0, errno, "Cannot chdir to ..");
 	if (update_prune_dirs && isemptydir (dir, 0))
 	{
 	    /* I'm not sure the existence_error is actually possible (except

Reply via email to