[dovecot-cvs] dovecot/src/master master-settings.c, 1.125.2.11, 1.125.2.12

cras at dovecot.org cras at dovecot.org
Thu Aug 10 21:52:40 EEST 2006


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

Modified Files:
      Tag: branch_1_0
	master-settings.c 
Log Message:
Allow base_dir to point to a symlink.



Index: master-settings.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/master-settings.c,v
retrieving revision 1.125.2.11
retrieving revision 1.125.2.12
diff -u -d -r1.125.2.11 -r1.125.2.12
--- master-settings.c	10 Aug 2006 18:46:21 -0000	1.125.2.11
+++ master-settings.c	10 Aug 2006 18:52:38 -0000	1.125.2.12
@@ -764,8 +764,9 @@
 		i_error("mkdir(%s) failed: %m", set->base_dir);
 		return FALSE;
 	}
-	if (lstat(set->base_dir, &st) < 0) {
-		i_error("lstat(%s) failed: %m", set->base_dir);
+	/* allow base_dir to be a symlink, so don't use lstat() */
+	if (stat(set->base_dir, &st) < 0) {
+		i_error("stat(%s) failed: %m", set->base_dir);
 		return FALSE;
 	}
 	if ((st.st_mode & 0750) != 0750 || (st.st_mode & 0777) == 0777) {



More information about the dovecot-cvs mailing list