]> the.earth.li Git - onak.git/commit
Avoid race condition when receiving incoming mails
authorJonathan McDowell <noodles@earth.li>
Wed, 25 Apr 2012 04:15:38 +0000 (21:15 -0700)
committerJonathan McDowell <noodles@earth.li>
Wed, 25 Apr 2012 04:15:38 +0000 (21:15 -0700)
commitfc7531131a7ccb7176f80ead865eee12b97a164c
tree7d081a0d49f4671d0d9e23a23c0a95c2cca5c542
parentd393825d164f31fe0194221b6ed90f3c320d8d44
Avoid race condition when receiving incoming mails

  There's a race condition between us starting to accept a new incoming
  mail and taking the lock to start processing it; a second copy of
  onak-mail may come in and start to process the incomplete mail we're
  in the process of receiving. Receive to a tmp file and rename to .onak
  after we've received everything.

  Fixes Debian bug #650557. Thanks to Helmut Grohne <helmut@subdivi.de>
onak-mail.pl.in