[dovecot-cvs] dovecot/src/master mail-process.c, 1.49, 1.50 master-settings.c, 1.52, 1.53 master-settings.h, 1.33, 1.34

cras at procontrol.fi cras at procontrol.fi
Fri Jun 11 06:21:48 EEST 2004


Update of /home/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv10696/master

Modified Files:
	mail-process.c master-settings.c master-settings.h 
Log Message:
Some of recent dotlock changes weren't committed..



Index: mail-process.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- mail-process.c	31 May 2004 18:04:47 -0000	1.49
+++ mail-process.c	11 Jun 2004 03:21:46 -0000	1.50
@@ -342,13 +342,12 @@
 		env_put("POP3_MAILS_KEEP_RECENT=1");
 	(void)umask(set->umask);
 
-	env_put(t_strconcat("MBOX_LOCKS=", set->mbox_locks, NULL));
+	env_put(t_strconcat("MBOX_READ_LOCKS=", set->mbox_read_locks, NULL));
+	env_put(t_strconcat("MBOX_WRITE_LOCKS=", set->mbox_write_locks, NULL));
 	env_put(t_strdup_printf("MBOX_LOCK_TIMEOUT=%u",
 				set->mbox_lock_timeout));
 	env_put(t_strdup_printf("MBOX_DOTLOCK_CHANGE_TIMEOUT=%u",
 				set->mbox_dotlock_change_timeout));
-	if (set->mbox_read_dotlock)
-		env_put("MBOX_READ_DOTLOCK=1");
 
 	if (group->set->mail_use_modules &&
 	    group->set->mail_modules != NULL &&

Index: master-settings.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/master-settings.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- master-settings.c	31 May 2004 18:04:47 -0000	1.52
+++ master-settings.c	11 Jun 2004 03:21:46 -0000	1.53
@@ -96,8 +96,8 @@
 	DEF(SET_BOOL, maildir_stat_dirs),
 	DEF(SET_BOOL, maildir_copy_with_hardlinks),
 	DEF(SET_BOOL, maildir_check_content_changes),
-	DEF(SET_STR, mbox_locks),
-	DEF(SET_BOOL, mbox_read_dotlock),
+	DEF(SET_STR, mbox_read_locks),
+	DEF(SET_STR, mbox_write_locks),
 	DEF(SET_INT, mbox_lock_timeout),
 	DEF(SET_INT, mbox_dotlock_change_timeout),
 	DEF(SET_INT, umask),
@@ -231,8 +231,8 @@
 	MEMBER(maildir_stat_dirs) FALSE,
 	MEMBER(maildir_copy_with_hardlinks) FALSE,
 	MEMBER(maildir_check_content_changes) FALSE,
-	MEMBER(mbox_locks) "dotlock fcntl",
-	MEMBER(mbox_read_dotlock) FALSE,
+	MEMBER(mbox_read_locks) "fcntl",
+	MEMBER(mbox_write_locks) "dotlock fcntl",
 	MEMBER(mbox_lock_timeout) 300,
 	MEMBER(mbox_dotlock_change_timeout) 30,
 	MEMBER(umask) 0077,
@@ -406,9 +406,7 @@
 
 static int settings_verify(struct settings *set)
 {
-	const char *const *str;
 	const char *dir;
-	int dotlock_got, fcntl_got, flock_got;
 
 	if (!get_login_uid(set))
 		return FALSE;
@@ -512,41 +510,6 @@
 		return FALSE;
 	}
 
-	dotlock_got = fcntl_got = flock_got = FALSE;
-        str = t_strsplit_spaces(set->mbox_locks, " ");
-	for (; *str != NULL; str++) {
-		if (strcasecmp(*str, "dotlock") == 0)
-			dotlock_got = TRUE;
-		else if (strcasecmp(*str, "fcntl") == 0)
-			fcntl_got = TRUE;
-		else if (strcasecmp(*str, "flock") == 0)
-			flock_got = TRUE;
-		else {
-			i_error("mbox_locks: Invalid value %s", *str);
-			return FALSE;
-		}
-	}
-
-#ifndef HAVE_FLOCK
-	if (flock_got) {
-		i_error("mbox_locks: flock is not supported in this system");
-		return FALSE;
-	}
-	flock_got = FALSE;
-#endif
-
-	if (!dotlock_got && !fcntl_got && !flock_got) {
-		i_error("mbox_locks: No mbox locking methods selected");
-		return FALSE;
-	}
-
-	if (dotlock_got && !set->mbox_read_dotlock &&
-	    !fcntl_got && !flock_got) {
-		i_warning("mbox_locks: Only dotlock selected, forcing "
-			  "mbox_read_dotlock = yes to avoid corruption.");
-                set->mbox_read_dotlock = TRUE;
-	}
-
 	if (access(set->login_executable, X_OK) < 0) {
 		i_error("Can't use login executable %s: %m",
 			set->login_executable);

Index: master-settings.h
===================================================================
RCS file: /home/cvs/dovecot/src/master/master-settings.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- master-settings.h	31 May 2004 18:04:47 -0000	1.33
+++ master-settings.h	11 Jun 2004 03:21:46 -0000	1.34
@@ -71,8 +71,8 @@
 	int maildir_stat_dirs;
 	int maildir_copy_with_hardlinks;
 	int maildir_check_content_changes;
-	const char *mbox_locks;
-	int mbox_read_dotlock;
+	const char *mbox_read_locks;
+	const char *mbox_write_locks;
 	unsigned int mbox_lock_timeout;
 	unsigned int mbox_dotlock_change_timeout;
 	unsigned int umask;



More information about the dovecot-cvs mailing list