[dovecot-cvs] dovecot/src/master master-settings.c,1.136,1.137

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


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

Modified Files:
	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.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- master-settings.c	10 Aug 2006 18:46:58 -0000	1.136
+++ master-settings.c	10 Aug 2006 18:52:39 -0000	1.137
@@ -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