Mercurial > dovecot > original-hg > dovecot-1.2
changeset 4864:29d665ef8787 HEAD
Use dovecot-shared file's mode also when creating dovecot-keywords file.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 03 Dec 2006 16:35:07 +0200 |
parents | d13324a8e242 |
children | a69ab82d7346 |
files | src/lib-storage/index/maildir/maildir-keywords.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-keywords.c Sun Dec 03 16:27:57 2006 +0200 +++ b/src/lib-storage/index/maildir/maildir-keywords.c Sun Dec 03 16:35:07 2006 +0200 @@ -251,6 +251,7 @@ unsigned int i, count; struct utimbuf ut; string_t *str; + mode_t old_mask; int fd; mk->synced = FALSE; @@ -264,8 +265,10 @@ t_push(); lock_path = t_strconcat(mk->path, ".lock", NULL); (void)unlink(lock_path); + old_mask = umask(0777 & ~mk->mbox->mail_create_mode); fd = file_dotlock_open(&mk->dotlock_settings, mk->path, DOTLOCK_CREATE_FLAG_NONBLOCK, &dotlock); + umask(old_mask); if (fd == -1) { mail_storage_set_critical(STORAGE(mk->mbox->storage), "file_dotlock_open(%s) failed: %m", mk->path);