[dovecot-cvs] dovecot/src/master master-settings.c,1.6,1.7

cras at procontrol.fi cras at procontrol.fi
Sat Feb 8 17:30:12 EET 2003


Update of /home/cvs/dovecot/src/master
In directory danu:/tmp/cvs-serv4352

Modified Files:
	master-settings.c 
Log Message:
Don't check log dir permission if the log file already exists



Index: master-settings.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/master-settings.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- master-settings.c	8 Feb 2003 15:14:38 -0000	1.6
+++ master-settings.c	8 Feb 2003 15:30:10 -0000	1.7
@@ -293,16 +293,19 @@
 		}
 	}
 
-	if (set->log_path != NULL) {
+	if (set->log_path != NULL && access(set->log_path, W_OK) < 0) {
 		dir = get_directory(set->log_path);
 		if (access(dir, W_OK) < 0)
-			i_fatal("Can't access log directory %s: %m", dir);
+			i_fatal("Can't write to log directory %s: %m", dir);
 	}
 
-	if (set->info_log_path != NULL) {
+	if (set->info_log_path != NULL &&
+	    access(set->info_log_path, W_OK) < 0) {
 		dir = get_directory(set->info_log_path);
-		if (access(dir, W_OK) < 0)
-			i_fatal("Can't access info log directory %s: %m", dir);
+		if (access(dir, W_OK) < 0) {
+			i_fatal("Can't write to info log directory %s: %m",
+				dir);
+		}
 	}
 
 #ifdef HAVE_SSL




More information about the dovecot-cvs mailing list