diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-12 20:44:50 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-12 20:44:50 +0000 |
commit | aed323171e127826b3dd64432947ae90e3ca3d36 (patch) | |
tree | fb3a2dd0c3e6a8d41d397714c098354738e5a567 | |
parent | 7244113d469f647f13d6c60b5eb79d2ce0f691e5 (diff) |
more XXXX for mktemp
-rw-r--r-- | lib/libc/stdio/tempnam.c | 10 | ||||
-rw-r--r-- | lib/libc/stdio/tmpfile.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/stdio/tempnam.c b/lib/libc/stdio/tempnam.c index 9e5b71177f5..d2060b0d18e 100644 --- a/lib/libc/stdio/tempnam.c +++ b/lib/libc/stdio/tempnam.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tempnam.c,v 1.7 1997/01/20 07:46:57 graichen Exp $"; +static char rcsid[] = "$OpenBSD: tempnam.c,v 1.8 1997/02/12 20:44:47 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -62,26 +62,26 @@ tempnam(dir, pfx) pfx = "tmp."; if (issetugid() == 0 && (f = getenv("TMPDIR"))) { - (void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f, + (void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXXXXX", f, *(f + strlen(f) - 1) == '/'? "": "/", pfx); if (f = _mktemp(name)) return(f); } if (f = (char *)dir) { - (void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f, + (void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXXXXX", f, *(f + strlen(f) - 1) == '/'? "": "/", pfx); if (f = _mktemp(name)) return(f); } f = P_tmpdir; - (void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx); + (void)snprintf(name, MAXPATHLEN, "%s%sXXXXXXXXX", f, pfx); if (f = _mktemp(name)) return(f); f = _PATH_TMP; - (void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx); + (void)snprintf(name, MAXPATHLEN, "%s%sXXXXXXXXX", f, pfx); if (f = _mktemp(name)) return(f); diff --git a/lib/libc/stdio/tmpfile.c b/lib/libc/stdio/tmpfile.c index fdf116c538e..5f558efee99 100644 --- a/lib/libc/stdio/tmpfile.c +++ b/lib/libc/stdio/tmpfile.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: tmpfile.c,v 1.2 1996/08/19 08:33:09 tholo Exp $"; +static char rcsid[] = "$OpenBSD: tmpfile.c,v 1.3 1997/02/12 20:44:49 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -52,7 +52,7 @@ tmpfile() sigset_t set, oset; FILE *fp; int fd, sverrno; -#define TRAILER "tmp.XXXXXX" +#define TRAILER "tmp.XXXXXXXXX" char buf[sizeof(_PATH_TMP) + sizeof(TRAILER)]; (void)memcpy(buf, _PATH_TMP, sizeof(_PATH_TMP) - 1); |