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 - acl support



details:   https://anonhg.NetBSD.org/src/rev/1ccf14413a02
branches:  trunk
changeset: 777879:1ccf14413a02
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Mar 08 20:33:02 2012 +0000

description:
- acl support
- check chdir return

diffstat:

 external/gpl2/xcvs/dist/src/update.c |  22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diffs (39 lines):

diff -r 38c15a6b56fa -r 1ccf14413a02 external/gpl2/xcvs/dist/src/update.c
--- a/external/gpl2/xcvs/dist/src/update.c      Thu Mar 08 20:32:31 2012 +0000
+++ b/external/gpl2/xcvs/dist/src/update.c      Thu Mar 08 20:33:02 2012 +0000
@@ -596,6 +596,25 @@
     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 @@
     {
        /* 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



Home | Main Index | Thread Index | Old Index