diff options
-rw-r--r-- | usr.bin/cvs/logmsg.c | 6 | ||||
-rw-r--r-- | usr.bin/cvs/server.c | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/cvs/logmsg.c b/usr.bin/cvs/logmsg.c index 63aa2b60e6a..652ccaf5ad9 100644 --- a/usr.bin/cvs/logmsg.c +++ b/usr.bin/cvs/logmsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: logmsg.c,v 1.18 2005/07/25 12:13:08 xsa Exp $ */ +/* $OpenBSD: logmsg.c,v 1.19 2005/08/08 14:28:59 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -40,7 +40,6 @@ #define CVS_LOGMSG_BIGMSG 32000 -#define CVS_LOGMSG_FTMPL "/tmp/cvsXXXXXXXXXX" #define CVS_LOGMSG_PREFIX "CVS:" #define CVS_LOGMSG_LINE \ "----------------------------------------------------------------------" @@ -184,7 +183,8 @@ cvs_logmsg_get(const char *dir, struct cvs_flist *added, fds[0] = -1; fds[1] = -1; fds[2] = -1; - strlcpy(path, CVS_LOGMSG_FTMPL, sizeof(path)); + strlcpy(path, cvs_tmpdir, sizeof(path)); + strlcat(path, "/cvsXXXXXXXXXX", sizeof(path)); argc = 0; argv[argc++] = cvs_editor; argv[argc++] = path; diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c index 2ef98a6c625..3c76ca702cd 100644 --- a/usr.bin/cvs/server.c +++ b/usr.bin/cvs/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.20 2005/07/27 10:36:14 xsa Exp $ */ +/* $OpenBSD: server.c,v 1.21 2005/08/08 14:28:59 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -28,7 +28,6 @@ #include <sys/stat.h> #include <errno.h> -#include <paths.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -87,7 +86,7 @@ cvs_server(int argc, char **argv) /* create the temporary directory */ l = snprintf(cvs_server_tmpdir, sizeof(cvs_server_tmpdir), - "%scvs-serv%d", _PATH_TMP, getpid()); + "%s/cvs-serv%d", cvs_tmpdir, getpid()); if (l == -1 || l >= (int)sizeof(cvs_server_tmpdir)) { errno = ENAMETOOLONG; cvs_log(LP_ERRNO, "%s", cvs_server_tmpdir); |