[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-keywords.c, 1.6.2.2, 1.6.2.3

tss at dovecot.org tss at dovecot.org
Sun Dec 3 14:35:07 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv883

Modified Files:
      Tag: branch_1_0
	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.6.2.2
retrieving revision 1.6.2.3
diff -u -d -r1.6.2.2 -r1.6.2.3
--- maildir-keywords.c	18 Nov 2006 21:48:12 -0000	1.6.2.2
+++ maildir-keywords.c	3 Dec 2006 14:35:05 -0000	1.6.2.3
@@ -266,6 +266,7 @@
 	unsigned int i, count;
 	struct utimbuf ut;
 	string_t *str;
+	mode_t old_mask;
 	int fd;
 
 	mk->synced = FALSE;
@@ -279,8 +280,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