[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog root.c root.h sanity.sh serv... [cvs1-11-x-
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog root.c root.h sanity.sh serv... [cvs1-11-x-branch] |
Date: |
Thu, 16 Aug 2007 18:28:34 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Branch: cvs1-11-x-branch
Changes by: Derek Robert Price <dprice> 07/08/16 18:28:32
Modified files:
src : ChangeLog root.c root.h sanity.sh server.c
Log message:
* root.c (root_allow_used): New function and...
* root.h (root_allow_used): ...its prototype.
* server.c (serve_root): Backport --allow-root test for `cvs server'.
* sanity.sh (server2-5, server2-6): New tests for the above.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&only_with_tag=cvs1-11-x-branch&r1=1.2336.2.486&r2=1.2336.2.487
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/root.c?cvsroot=cvs&only_with_tag=cvs1-11-x-branch&r1=1.60.2.16&r2=1.60.2.17
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/root.h?cvsroot=cvs&only_with_tag=cvs1-11-x-branch&r1=1.2.2.5&r2=1.2.2.6
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sanity.sh?cvsroot=cvs&only_with_tag=cvs1-11-x-branch&r1=1.752.2.211&r2=1.752.2.212
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/server.c?cvsroot=cvs&only_with_tag=cvs1-11-x-branch&r1=1.284.2.53&r2=1.284.2.54
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.2336.2.486
retrieving revision 1.2336.2.487
diff -u -b -r1.2336.2.486 -r1.2336.2.487
--- ChangeLog 19 Jun 2007 02:56:11 -0000 1.2336.2.486
+++ ChangeLog 16 Aug 2007 18:28:30 -0000 1.2336.2.487
@@ -1,3 +1,10 @@
+2007-08-16 Derek Price <address@hidden>
+
+ * root.c (root_allow_used): New function and...
+ * root.h (root_allow_used): ...its prototype.
+ * server.c (serve_root): Backport --allow-root test for `cvs server'.
+ * sanity.sh (server2-5, server2-6): New tests for the above.
+
2007-06-18 Derek Price <address@hidden>
* client.c (send_repository): Don't attempt to send metadata from CVS
Index: root.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/root.c,v
retrieving revision 1.60.2.16
retrieving revision 1.60.2.17
diff -u -b -r1.60.2.16 -r1.60.2.17
--- root.c 7 Dec 2005 19:39:25 -0000 1.60.2.16
+++ root.c 16 Aug 2007 18:28:30 -0000 1.60.2.17
@@ -182,6 +182,12 @@
static char **root_allow_vector;
static int root_allow_size;
+int
+root_allow_used ()
+{
+ return root_allow_count;
+}
+
void
root_allow_add (arg)
char *arg;
Index: root.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/root.h,v
retrieving revision 1.2.2.5
retrieving revision 1.2.2.6
diff -u -b -r1.2.2.5 -r1.2.2.6
--- root.h 7 Dec 2005 19:39:25 -0000 1.2.2.5
+++ root.h 16 Aug 2007 18:28:30 -0000 1.2.2.6
@@ -54,3 +54,4 @@
void root_allow_add PROTO ((char *));
void root_allow_free PROTO ((void));
int root_allow_ok PROTO ((char *));
+int root_allow_used PROTO ((void));
Index: sanity.sh
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sanity.sh,v
retrieving revision 1.752.2.211
retrieving revision 1.752.2.212
diff -u -b -r1.752.2.211 -r1.752.2.212
--- sanity.sh 15 Jun 2007 21:11:13 -0000 1.752.2.211
+++ sanity.sh 16 Aug 2007 18:28:30 -0000 1.752.2.212
@@ -28982,7 +28982,7 @@
noop
EOF
- dotest 2-3 "${testcvs} server" \
+ dotest server2-3 "${testcvs} server" \
"E protocol error: directory '${TESTDIR}' not within root '${CVSROOT_DIRNAME}'
error " <<EOF
Root ${CVSROOT_DIRNAME}
@@ -29004,6 +29004,19 @@
Unchanged foo/bar
noop
EOF
+ dotest server2-5 \
+"$testcvs --allow-root=$CVSROOT_DIRNAME.bad server" \
+"E Bad root $CVSROOT_DIRNAME
+error " <<EOF
+Root $CVSROOT_DIRNAME
+noop
+EOF
+ dotest server2-6 \
+"$testcvs --allow-root=$CVSROOT_DIRNAME server" \
+"ok" <<EOF
+Root $CVSROOT_DIRNAME
+noop
+EOF
fi
;;
Index: server.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/server.c,v
retrieving revision 1.284.2.53
retrieving revision 1.284.2.54
diff -u -b -r1.284.2.53 -r1.284.2.54
--- server.c 7 May 2007 13:14:30 -0000 1.284.2.53
+++ server.c 16 Aug 2007 18:28:32 -0000 1.284.2.54
@@ -759,6 +759,19 @@
return;
}
+ /* We need to check :ext: server here, :pserver: checks happen below. */
+ if (root_allow_used() && !root_allow_ok (arg)
+# ifdef AUTH_SERVER_SUPPORT
+ && Pserver_Repos == NULL
+# endif
+ )
+ {
+ if (alloc_pending (80 + strlen (arg)))
+ sprintf (pending_error_text,
+ "E Bad root %s", arg);
+ return;
+ }
+
#ifdef AUTH_SERVER_SUPPORT
if (Pserver_Repos != NULL)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Cvs-cvs] ccvs/src ChangeLog root.c root.h sanity.sh serv... [cvs1-11-x-branch],
Derek Robert Price <=