<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">--- wu-ftpd-2.6.1/util/privatepw/privatepw.c.original	Wed Dec 27 07:28:49 2000
+++ wu-ftpd-2.6.1/util/privatepw/privatepw.c	Wed Dec 27 07:33:34 2000
@@ -211,6 +211,8 @@
     int c;
 
     FILE *tfp;
+    int tfd;
+    char tmpname[BUFLEN];
 
     opterr = 0;
     create = 0;
@@ -294,9 +296,15 @@
 	return (0);
     }
 
-    tmp = tmpnam(NULL);
+    strcpy (tmpname, "/tmp/privatepwXXXXXX");
+    tmp = &amp;tmpname[0];
+    tfd = mkstemp (tmp);
+    if (tfd &lt; 0) {
+	fprintf(stderr, "Could not open temp file.\n");
+	return (1);
+    }
 
-    if ((tfp = fopen(tmp, "w")) == NULL) {
+    if ((tfp = fdopen(tfd, "w")) == NULL) {
 	fprintf(stderr, "Could not open temp file.\n");
 	return (1);
     }
</pre></body></html>