This appears to avoid the problem.. not sure what side effects it has.

* looking for [EMAIL PROTECTED]/tla--devo--1.3--patch-16 to compare with
* comparing to [EMAIL PROTECTED]/tla--devo--1.3--patch-16
M  libarch/archive-mirror.c
M  libarch/pfs.c
M  libarch/pfs-dav.c
M  libarch/pfs-sftp.c
M  libarch/archive-pfs.c
M  libarch/pfs-signatures.c

* modified files

--- orig/libarch/archive-mirror.c
+++ mod/libarch/archive-mirror.c
@@ -250,7 +250,7 @@
       t_uchar * tmp_path = 0;
       int fd;
 
-      tmp_path = tmp_file_name ("/tmp", ",,arch-mirror-changeset");
+      tmp_path = tempnam ("/tmp", ",,arch-mirror-changeset");
       fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0000);
       safe_unlink (tmp_path);
 
@@ -274,7 +274,7 @@
       t_uchar * tmp_path = 0;
       int fd;
 
-      tmp_path = tmp_file_name ("/tmp", ",,arch-mirror-full-text");
+      tmp_path = tempnam ("/tmp", ",,arch-mirror-full-text");
       fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0000);
       safe_unlink (tmp_path);
 
@@ -348,7 +348,7 @@
       t_uchar * tmp_path = 0;
       int fd;
 
-      tmp_path = tmp_file_name ("/tmp", ",,arch-mirror-archive-cached");
+      tmp_path = tempnam ("/tmp", ",,arch-mirror-archive-cached");
       fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0000);
       safe_unlink (tmp_path);
 


--- orig/libarch/archive-pfs.c
+++ mod/libarch/archive-pfs.c
@@ -1473,7 +1473,7 @@
   locked_contents_path = arch_fs_archive_revision_lock_locked_contents_path 
(0, version, prev_level, uid, txn_id);
   log_path = file_name_in_vicinity (0, locked_contents_path, "log");
 
-  tmp_path = tmp_file_name ("/tmp", ",,pfs-dav-put-log");
+  tmp_path = tempnam ("/tmp", ",,pfs-dav-put-log");
   fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0400);
 
   safe_printfmt (fd, "%s", log_text);
@@ -1514,7 +1514,7 @@
   locked_contents_path = arch_fs_archive_revision_lock_locked_contents_path 
(0, version, prev_level, uid, txn_id);
   continuation_path = file_name_in_vicinity (0, locked_contents_path, 
"CONTINUATION");
 
-  tmp_path = tmp_file_name ("/tmp", ",,pfs-dav-put-log");
+  tmp_path = tempnam ("/tmp", ",,pfs-dav-put-log");
   fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0400);
 
   safe_printfmt (fd, "%s", continuation);
@@ -1776,7 +1776,7 @@
       t_uchar * tmp_contents = 0;
       int my_fd = -1;
 
-      tmp_contents = tmp_file_name ("/tmp", ",,arch-sign-and-upload"); 
+      tmp_contents = tempnam ("/tmp", ",,arch-sign-and-upload"); 
 
       my_fd = safe_open (tmp_contents, O_RDWR | O_CREAT | O_EXCL, 0400);
       copy_fd (in_fd, my_fd);
@@ -1802,7 +1802,7 @@
 
   invariant(arch->txn_signature_file == 0);
     
-  arch->txn_signature_file = tmp_file_name ("/tmp", ",,archive-signature");
+  arch->txn_signature_file = tempnam ("/tmp", ",,archive-signature");
   arch->txn_signature_fd = safe_open (arch->txn_signature_file, O_RDWR | 
O_CREAT | O_EXCL, 0400);
   safe_printfmt (arch->txn_signature_fd, "Signature-for: %s/%s\n", 
a->official_name, revision);
 


--- orig/libarch/pfs-dav.c
+++ mod/libarch/pfs-dav.c
@@ -297,7 +297,7 @@
   int ne_err;
   t_uchar * answer = 0;
 
-  tmp_path = tmp_file_name ("/tmp", ",,pfs-dav-file-contents");
+  tmp_path = tempnam ("/tmp", ",,pfs-dav-file-contents");
   fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0000);
   safe_unlink (tmp_path);
 


--- orig/libarch/pfs-sftp.c
+++ mod/libarch/pfs-sftp.c
@@ -745,7 +745,7 @@
   int fd;
   t_uchar * answer = 0;
 
-  tmp_path = tmp_file_name ("/tmp", ",,pfs-sftp-file-contents");
+  tmp_path = tempnam ("/tmp", ",,pfs-sftp-file-contents");
   fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0000);
   safe_unlink (tmp_path);
 


--- orig/libarch/pfs-signatures.c
+++ mod/libarch/pfs-signatures.c
@@ -267,7 +267,7 @@
       return answer;
     }
 
-  tmp_path = tmp_file_name ("/tmp", "checksum-contents");
+  tmp_path = tempnam ("/tmp", "checksum-contents");
   tmp_fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0);
   safe_unlink (tmp_path);
   safe_write_retry (tmp_fd, signed_message, str_length (signed_message));
@@ -849,7 +849,7 @@
       key = str_alloc_cat_many (0, arch->arch.name, " ", revision, " ", tail, 
str_end);
       remembered_md5 = assoc_ref (remembered_md5s, key);
 
-      tmp_path = tmp_file_name ("/tmp", "arch-file");
+      tmp_path = tempnam ("/tmp", "arch-file");
       tmp_fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0);
       safe_unlink (tmp_path);
       arch_pfs_get_file (arch->pfs, tmp_fd, path, 0);


--- orig/libarch/pfs.c
+++ mod/libarch/pfs.c
@@ -101,7 +101,7 @@
 
   if (mirror_of)
     {
-      tmp_path = tmp_file_name ("/tmp", ",,pfs-sftp-file-contents");
+      tmp_path = tempnam ("/tmp", ",,pfs-sftp-file-contents");
       name_fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0000);
       safe_unlink (tmp_path);
       safe_printfmt (name_fd, "%s\n", mirror_of);
@@ -117,7 +117,7 @@
     }
   else
     {
-      tmp_path = tmp_file_name ("/tmp", ",,pfs-sftp-file-contents");
+      tmp_path = tempnam ("/tmp", ",,pfs-sftp-file-contents");
       name_fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0000);
       safe_unlink (tmp_path);
       safe_printfmt (name_fd, "%s\n", name);
@@ -132,7 +132,7 @@
       int tmp_blowage_fd = 0;
       t_uchar * http_blows_path = 0;
 
-      tmp_blowage_path = tmp_file_name ("/tmp", ",,pfs-http-blows");
+      tmp_blowage_path = tempnam ("/tmp", ",,pfs-http-blows");
       tmp_blowage_fd = safe_open (tmp_blowage_path, O_RDWR | O_CREAT | O_EXCL, 
0000);
       safe_unlink (tmp_blowage_path);
       safe_printfmt (tmp_blowage_fd, "it sure does\n");
@@ -152,7 +152,7 @@
       int tmp_signage_fd = 0;
       t_uchar * http_signed_path = 0;
 
-      tmp_signage_path = tmp_file_name ("/tmp", ",,pfs-signed-archive");
+      tmp_signage_path = tempnam ("/tmp", ",,pfs-signed-archive");
       tmp_signage_fd = safe_open (tmp_signage_path, O_RDWR | O_CREAT | O_EXCL, 
0000);
       safe_unlink (tmp_signage_path);
       safe_printfmt (tmp_signage_fd, "system cracking is (nearly always) 
lame\n");
@@ -167,7 +167,7 @@
     }
 
 
-  tmp_path = tmp_file_name ("/tmp", ",,pfs-sftp-file-contents");
+  tmp_path = tempnam ("/tmp", ",,pfs-sftp-file-contents");
   version_fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0000);
   safe_unlink (tmp_path);
   safe_printfmt (version_fd, "%s\n", version);
@@ -324,7 +324,7 @@
   rel_table files_before = 0;
   rel_table files_after = 0;
 
-  tmp_path = tmp_file_name ("/tmp", ",,pfs-dot-listing");
+  tmp_path = tempnam ("/tmp", ",,pfs-dot-listing");
   tmp_fd = safe_open (tmp_path, O_RDWR | O_CREAT | O_EXCL, 0000);
   safe_unlink (tmp_path);
 




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to