summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/cvs/server.c')
-rw-r--r--usr.bin/cvs/server.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c
index 59bd3d0d549..fe17771cdc7 100644
--- a/usr.bin/cvs/server.c
+++ b/usr.bin/cvs/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.41 2006/12/04 09:51:21 xsa Exp $ */
+/* $OpenBSD: server.c,v 1.42 2006/12/15 08:02:53 xsa Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -217,6 +217,28 @@ cvs_server_validreq(char *data)
}
void
+cvs_server_sticky(char *data)
+{
+ FILE *fp;
+ char *tagpath;
+
+ tagpath = xmalloc(MAXPATHLEN);
+ if (cvs_path_cat(server_currentdir, CVS_PATH_TAG, tagpath,
+ MAXPATHLEN) >= MAXPATHLEN)
+ fatal("cvs_server_sticky: truncation");
+
+ if ((fp = fopen(tagpath ,"w+")) == NULL) {
+ cvs_log(LP_ERRNO, "%s", tagpath);
+ goto out;
+ }
+
+ (void)fprintf(fp, "%s\n", data);
+ (void)fclose(fp);
+out:
+ xfree(tagpath);
+}
+
+void
cvs_server_globalopt(char *data)
{
if (!strcmp(data, "-l"))