* movemail.c: Fix race condition and related bugs (Bug#8836).
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 10 Jun 2011 17:50:07 +0000 (10:50 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 10 Jun 2011 17:50:07 +0000 (10:50 -0700)
commit529a133c390049085db38e7c8f745d650a2626ee
treeaaecf1090380ee50e0f15a102dd3be76dad9af10
parent2547adb13e24bcb6aa855b8e107a16bc0205002e
* movemail.c: Fix race condition and related bugs (Bug#8836).

(main) [!MAIL_USE_SYSTEM_LOCK]: Prefer mkstemp to mktemp, as this
fixes some race conditions.  Report mkstemp/mktemp errno rather
than a possibly-garbage errno.  Reinitialize the template each
time through the loop, as earlier mkstemp/mktemp calls could have
trashed it.  Pass 0600 (not 0666) to mktemp, for consistency
with mkstemp; the permissions don't matter anyway.
lib-src/ChangeLog
lib-src/movemail.c