[dovecot-cvs] dovecot/src/master master-settings.c,1.107,1.108

cras at dovecot.org cras at dovecot.org
Sun Jan 22 14:12:54 EET 2006


Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv29752

Modified Files:
	master-settings.c 
Log Message:
Make base_dir world-readable, not world-writable.



Index: master-settings.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/master-settings.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- master-settings.c	22 Jan 2006 11:33:30 -0000	1.107
+++ master-settings.c	22 Jan 2006 12:12:52 -0000	1.108
@@ -650,14 +650,17 @@
 		i_error("lstat(%s) failed: %m", set->base_dir);
 		return FALSE;
 	}
-	if ((st.st_mode & 0750) != 0750) {
+	if ((st.st_mode & 0750) != 0750 || (st.st_mode == 0777)) {
 		/* FIXME: backwards compatibility: fix permissions so that
 		   login processes can find ssl-parameters file. Group rx is
 		   enough, but change it to world-rx so that we don't have to
-		   start changing groups and causing possibly other problems. */
+		   start changing groups and causing possibly other problems.
+
+		   The second check is to fix 1.0beta1's accidental 0777
+		   mode change.. */
 		i_warning("Fixing permissions of %s to be world-readable",
 			  set->base_dir);
-		if (chmod(set->base_dir, 0777) < 0)
+		if (chmod(set->base_dir, 0755) < 0)
 			i_error("chmod(%s) failed: %m", set->base_dir);
 	}
 



More information about the dovecot-cvs mailing list