summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjfb <jfb@openbsd.org>2004-12-16 17:09:33 +0000
committerjfb <jfb@openbsd.org>2004-12-16 17:09:33 +0000
commitd26d09e2e82b0db984dbf2ad3108e25b9ad0b7d3 (patch)
tree11740ff16813ff51b3c863995120faab45a01554
parentFix logic botch in dmacomputeipl() introduced in rev 1.14. (diff)
downloadwireguard-openbsd-d26d09e2e82b0db984dbf2ad3108e25b9ad0b7d3.tar.xz
wireguard-openbsd-d26d09e2e82b0db984dbf2ad3108e25b9ad0b7d3.zip
make cvs_connect() print an error message and return with an error
code if an unsupported connection method is specified in the root specification, and warn that pserver will never be supported due to its poor security
-rw-r--r--usr.bin/cvs/proto.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/usr.bin/cvs/proto.c b/usr.bin/cvs/proto.c
index 8aab14f2cbd..ae3a078f526 100644
--- a/usr.bin/cvs/proto.c
+++ b/usr.bin/cvs/proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proto.c,v 1.35 2004/12/14 17:52:37 jfb Exp $ */
+/* $OpenBSD: proto.c,v 1.36 2004/12/16 17:09:33 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -196,6 +196,16 @@ cvs_connect(struct cvsroot *root)
int argc, infd[2], outfd[2], errfd[2];
char *argv[16], *cvs_server_cmd, *vresp;
+ if (root->cr_method == CVS_METHOD_PSERVER) {
+ cvs_log(LP_ERR, "no pserver support due to security issues");
+ return (-1);
+ } else if ((root->cr_method == CVS_METHOD_KSERVER) ||
+ (root->cr_method == CVS_METHOD_GSERVER) ||
+ (root->cr_method == CVS_METHOD_EXT) ||
+ (root->cr_method == CVS_METHOD_FORK)) {
+ cvs_log(LP_ERR, "connection method not supported yet");
+ return (-1);
+ }
if (root->cr_flags & CVS_ROOT_CONNECTED) {
cvs_log(LP_NOTICE, "already connected to CVSROOT");
@@ -249,7 +259,6 @@ cvs_connect(struct cvsroot *root)
argv[argc++] = root->cr_user;
}
-
cvs_server_cmd = getenv("CVS_SERVER");
if (cvs_server_cmd == NULL)
cvs_server_cmd = CVS_SERVER_DEFAULT;
@@ -664,7 +673,7 @@ cvs_sendreq(struct cvsroot *root, u_int rid, const char *arg)
struct cvs_req *req;
if (root->cr_srvin == NULL) {
- cvs_log(LP_ERR, "cannot send request: Not connected");
+ cvs_log(LP_ERR, "cannot send request %u: Not connected", rid);
return (-1);
}