dovecot-2.2: sdbox: Fixed race condition when two processes mkdi...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Oct 6 18:16:26 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/3e9fda96a205
changeset: 17896:3e9fda96a205
user: Timo Sirainen <tss at iki.fi>
date: Mon Oct 06 21:15:31 2014 +0300
description:
sdbox: Fixed race condition when two processes mkdir() the same directory
diffstat:
src/lib-storage/index/dbox-single/sdbox-file.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r 1b66c30fd421 -r 3e9fda96a205 src/lib-storage/index/dbox-single/sdbox-file.c
--- a/src/lib-storage/index/dbox-single/sdbox-file.c Mon Oct 06 20:17:19 2014 +0300
+++ b/src/lib-storage/index/dbox-single/sdbox-file.c Mon Oct 06 21:15:31 2014 +0300
@@ -255,7 +255,8 @@
dir = t_strdup_until(path, p);
if (mkdir_parents_chgrp(dir, perm->dir_create_mode,
perm->file_create_gid,
- perm->file_create_gid_origin) < 0) {
+ perm->file_create_gid_origin) < 0 &&
+ errno != EEXIST) {
mail_storage_set_critical(box->storage,
"mkdir_parents(%s) failed: %m", dir);
return -1;
More information about the dovecot-cvs
mailing list