[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-keywords.c, 1.10, 1.11
tss at dovecot.org
tss at dovecot.org
Sun Dec 3 14:35:10 UTC 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv879
Modified Files:
maildir-keywords.c
Log Message:
Use dovecot-shared file's mode also when creating dovecot-keywords file.
Index: maildir-keywords.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-keywords.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- maildir-keywords.c 18 Nov 2006 21:48:13 -0000 1.10
+++ maildir-keywords.c 3 Dec 2006 14:35:07 -0000 1.11
@@ -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);
More information about the dovecot-cvs
mailing list