summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxsa <xsa@openbsd.org>2006-12-15 15:40:28 +0000
committerxsa <xsa@openbsd.org>2006-12-15 15:40:28 +0000
commit04465c2819a729ff1535dd1b7aabcd3e7ca321b9 (patch)
treea35719c74c5920fca26749b2a9e4fcbff4cd300e
parentfix every architecture being treated as strictly aligned in sf_rxintr() by (diff)
downloadwireguard-openbsd-04465c2819a729ff1535dd1b7aabcd3e7ca321b9.tar.xz
wireguard-openbsd-04465c2819a729ff1535dd1b7aabcd3e7ca321b9.zip
add support for "Static-directory" request.
-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);