Merge branch 'bug/2390-tmpfile-race'
[exim.git] / src / src / spool_out.c
index 8b227dedb139f669f87e77882ccd46103855a32b..a4a734a1ad196a5ba9661713d90279682ab2168a 100644 (file)
@@ -134,8 +134,7 @@ struct stat statbuf;
 uschar * tname;
 uschar * fname;
 
-tname = spool_fname(US"input", message_subdir,
-                   string_sprintf("hdr.%d", (int)getpid()), US"");
+tname = spool_fname(US"input", message_subdir, US"hdr.", message_id);
 
 if ((fd = spool_open_temp(tname)) < 0)
   return spool_write_error(where, errmsg, US"open", NULL, NULL);
@@ -250,10 +249,6 @@ if (tls_in.ourcert)
   fprintf(fp, "-tls_ourcert %s\n", CS big_buffer);
   }
 if (tls_in.ocsp)        fprintf(fp, "-tls_ocsp %d\n",   tls_in.ocsp);
-
-# ifdef EXPERIMENTAL_REQUIRETLS
-if (tls_requiretls)     fprintf(fp, "-tls_requiretls 0x%x\n", tls_requiretls);
-# endif
 #endif
 
 #ifdef SUPPORT_I18N