summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2009-02-21 13:39:02 +0000
committerJoris Vink <joris@cvs.openbsd.org>2009-02-21 13:39:02 +0000
commit98d343b077b7b3e0591c973266575a6a4805af44 (patch)
tree8d621a3efd452cd251d09bf2f30eeca5445da35f /usr.bin/cvs
parentac3f38197e3e93b93a72338c61b2f56f4fce7c18 (diff)
correct Set-sticky and Clear-sticky responses to
include the right repository path. we messed up some cvs implementations by doing this incorrectly.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/server.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c
index ec5d1904a6f..947138463cc 100644
--- a/usr.bin/cvs/server.c
+++ b/usr.bin/cvs/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.92 2008/07/08 12:54:13 joris Exp $ */
+/* $OpenBSD: server.c,v 1.93 2009/02/21 13:39:01 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -776,16 +776,17 @@ void
cvs_server_set_sticky(const char *dir, const char *tag)
{
char fpath[MAXPATHLEN];
+ char repo[MAXPATHLEN];
+ cvs_get_repository_path(dir, repo, MAXPATHLEN);
if (module_repo_root != NULL) {
(void)xsnprintf(fpath, MAXPATHLEN, "%s/%s/%s",
- current_cvsroot->cr_dir, module_repo_root, dir);
+ current_cvsroot->cr_dir, module_repo_root, repo);
} else {
- (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s",
- current_cvsroot->cr_dir, dir);
+ (void)xsnprintf(fpath, MAXPATHLEN, "%s/", repo);
}
- cvs_server_send_response("Set-sticky %s", dir);
+ cvs_server_send_response("Set-sticky %s/", dir);
cvs_remote_output(fpath);
cvs_remote_output(tag);
}
@@ -794,15 +795,16 @@ void
cvs_server_clear_sticky(char *dir)
{
char fpath[MAXPATHLEN];
+ char repo[MAXPATHLEN];
+ cvs_get_repository_path(dir, repo, MAXPATHLEN);
if (module_repo_root != NULL) {
(void)xsnprintf(fpath, MAXPATHLEN, "%s/%s/%s",
- current_cvsroot->cr_dir, module_repo_root, dir);
+ current_cvsroot->cr_dir, module_repo_root, repo);
} else {
- (void)xsnprintf(fpath, MAXPATHLEN, "%s/%s",
- current_cvsroot->cr_dir, dir);
+ (void)xsnprintf(fpath, MAXPATHLEN, "%s/", repo);
}
- cvs_server_send_response("Clear-sticky %s", dir);
+ cvs_server_send_response("Clear-sticky %s//", dir);
cvs_remote_output(fpath);
}