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 - put back missing noexec check



details:   https://anonhg.NetBSD.org/src/rev/6d093ac78afb
branches:  trunk
changeset: 777898:6d093ac78afb
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Mar 08 20:47:45 2012 +0000

description:
- put back missing noexec check
- add cvs acl support

diffstat:

 external/gpl2/xcvs/dist/src/import.c |  16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diffs (33 lines):

diff -r 69ceae3fddb9 -r 6d093ac78afb external/gpl2/xcvs/dist/src/import.c
--- a/external/gpl2/xcvs/dist/src/import.c      Thu Mar 08 20:47:17 2012 +0000
+++ b/external/gpl2/xcvs/dist/src/import.c      Thu Mar 08 20:47:45 2012 +0000
@@ -320,6 +320,20 @@
        error (1, 0, "attempt to import the repository");
     }
 
+/* cvsacl patch */
+#ifdef SERVER_SUPPORT
+    if (use_cvs_acl /* && server_active */)
+    {
+       if (!access_allowed (NULL, repository, argv[1], 6, NULL, NULL, 1))
+       {
+           error (stop_at_first_permission_denied, 0,
+                  "permission denied for %s", Short_Repository (repository));
+                       
+           return (0);
+       }
+    }
+#endif
+
     ulist = getlist ();
     p = getnode ();
     p->type = UPDATE;
@@ -595,7 +609,7 @@
                /* Attempt to make the Attic directory, in case it
                   does not exist.  */
                (void) sprintf (rcs, "%s/%s", repository, CVSATTIC);
-               if (CVS_MKDIR (rcs, 0777 ) != 0 && errno != EEXIST)
+               if (noexec == 0 && CVS_MKDIR (rcs, 0777 ) != 0 && errno != EEXIST)
                    error (1, errno, "cannot make directory `%s'", rcs);
 
                /* Note that the above clobbered the path name, so we



Home | Main Index | Thread Index | Old Index