18 lines
493 B
Plaintext
18 lines
493 B
Plaintext
$OpenBSD: patch-common_tmpfile_c,v 1.1 2007/10/26 22:00:31 ajacoutot Exp $
|
|
--- common/tmpfile.c.orig Tue May 9 10:06:46 1995
|
|
+++ common/tmpfile.c Fri Oct 26 23:58:56 2007
|
|
@@ -90,7 +90,12 @@ void tmpfile_free()
|
|
char *tmpfile_create()
|
|
{
|
|
TMP_FILE *ptr, *tf;
|
|
- char *filename = strdup(tmpnam(NULL));
|
|
+ char xxx[40];
|
|
+ char *filename;
|
|
+
|
|
+ sprintf(xxx, "/tmp/tmpf.XXXXXXXX");
|
|
+ close(mkstemp(xxx));
|
|
+ filename = strdup(xxx);
|
|
|
|
if(filename == NULL)
|
|
return(NULL);
|