diff src/master/main.c @ 8301:d46579bb7a3c HEAD

Print a help message about authentication at startup until the first successful authentication.
author Timo Sirainen <tss@iki.fi>
date Sun, 19 Oct 2008 13:32:01 +0300
parents a69c49565a5b
children e4d0ce4d3420
line wrap: on
line diff
--- a/src/master/main.c	Sun Oct 19 02:07:34 2008 +0300
+++ b/src/master/main.c	Sun Oct 19 13:32:01 2008 +0300
@@ -42,6 +42,7 @@
 char program_path[PATH_MAX];
 char ssl_manual_key_password[100];
 const char *env_tz;
+bool auth_success_written;
 #ifdef DEBUG
 bool gdb;
 #endif
@@ -99,6 +100,19 @@
 		i_error("unlink(%s) failed: %m", path);
 }
 
+static void auth_warning_print(void)
+{
+	struct stat st;
+
+	auth_success_written = stat(AUTH_SUCCESS_PATH, &st) == 0;
+	if (!auth_success_written) {
+		i_info("If you have trouble with authentication failures,\n"
+		       "enable auth_debug setting. "
+		       "See http://wiki.dovecot.org/WhyDoesItNotWork");
+
+	}
+}
+
 static void set_logfile(struct settings *set)
 {
 	int facility;
@@ -559,6 +573,8 @@
 		open_fds();
 
 	fatal_log_check();
+	if (strcmp(settings_root->defaults->protocols, "none") != 0)
+		auth_warning_print();
 	if (!foreground)
 		daemonize(settings_root->defaults);