summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2006-12-15 15:40:29 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2006-12-15 15:40:29 +0000
commitd7cbe6af73b3f281f4d269d5c27324e2527656ad (patch)
treebb7be6e834c3d4591c94646653d2da215d81969f /usr.bin/cvs
parentc8db74f4da5c0f1897d5945935a339c34f20b39e (diff)
add support for "Static-directory" request.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/client.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c
index 8de9f59bee7..bc6c6bf1e82 100644
--- a/usr.bin/cvs/client.c
+++ b/usr.bin/cvs/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.33 2006/12/15 13:12:14 xsa Exp $ */
+/* $OpenBSD: client.c,v 1.34 2006/12/15 15:40:28 xsa Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -386,8 +386,9 @@ cvs_client_get_responses(void)
void
cvs_client_senddir(const char *dir)
{
+ struct stat st;
int nb;
- char *d, *date, *repo, *tag;
+ char *d, *date, *fpath, *repo, *tag;
d = NULL;
@@ -401,6 +402,16 @@ cvs_client_senddir(const char *dir)
xfree(repo);
+ fpath = xmalloc(MAXPATHLEN);
+ if (cvs_path_cat(dir, CVS_PATH_STATICENTRIES, fpath, MAXPATHLEN) >=
+ MAXPATHLEN)
+ fatal("cvs_client_senddir: truncation");
+
+ if (stat(fpath, &st) == 0 && (st.st_mode & (S_IRUSR|S_IRGRP|S_IROTH)))
+ cvs_client_send_request("Static-directory");
+
+ xfree(fpath);
+
d = xstrdup(dir);
cvs_parse_tagfile(d, &tag, &date, &nb);