diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-12-15 08:02:54 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2006-12-15 08:02:54 +0000 |
commit | bde5f356eb1af7a9529e063bdafb7b44084f0314 (patch) | |
tree | a45cc9a6028ff977712a6787f3715953bf3f7e5b /usr.bin/cvs/server.c | |
parent | 68b6f17ee337c5f9a9ec7019e74b22389f3c7092 (diff) |
server-side Sticky bits.
Diffstat (limited to 'usr.bin/cvs/server.c')
-rw-r--r-- | usr.bin/cvs/server.c | 24 |
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")) |