dovecot-1.1: Login processes: If auth_debug=yes, log about recei...

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 25 16:07:35 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/a66833913957
changeset: 7970:a66833913957
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Oct 25 16:06:34 2008 +0300
description:
Login processes: If auth_debug=yes, log about received unknown passdb extra fields.

diffstat:

5 files changed, 13 insertions(+), 2 deletions(-)
src/imap-login/client-authenticate.c |    4 ++++
src/login-common/common.h            |    2 +-
src/login-common/main.c              |    3 ++-
src/master/login-process.c           |    2 ++
src/pop3-login/client-authenticate.c |    4 ++++

diffs (72 lines):

diff -r e2dad6156c34 -r a66833913957 src/imap-login/client-authenticate.c
--- a/src/imap-login/client-authenticate.c	Sat Oct 25 15:20:33 2008 +0300
+++ b/src/imap-login/client-authenticate.c	Sat Oct 25 16:06:34 2008 +0300
@@ -109,6 +109,10 @@ static bool client_handle_args(struct im
 			destuser = *args + 9;
 		else if (strncmp(*args, "pass=", 5) == 0)
 			pass = *args + 5;
+		else if (auth_debug) {
+			i_info("Ignoring unknown passdb extra field: %s",
+			       *args);
+		}
 	}
 
 	if (destuser == NULL)
diff -r e2dad6156c34 -r a66833913957 src/login-common/common.h
--- a/src/login-common/common.h	Sat Oct 25 15:20:33 2008 +0300
+++ b/src/login-common/common.h	Sat Oct 25 16:06:34 2008 +0300
@@ -14,7 +14,7 @@ extern const char *login_protocol;
 extern const char *login_protocol;
 
 extern bool disable_plaintext_auth, process_per_connection, greeting_capability;
-extern bool verbose_proctitle, verbose_ssl, verbose_auth;
+extern bool verbose_proctitle, verbose_ssl, verbose_auth, auth_debug;
 extern bool ssl_require_client_cert;
 extern const char *greeting, *log_format;
 extern const char *const *log_format_elements;
diff -r e2dad6156c34 -r a66833913957 src/login-common/main.c
--- a/src/login-common/main.c	Sat Oct 25 15:20:33 2008 +0300
+++ b/src/login-common/main.c	Sat Oct 25 16:06:34 2008 +0300
@@ -20,7 +20,7 @@
 #include <syslog.h>
 
 bool disable_plaintext_auth, process_per_connection, greeting_capability;
-bool verbose_proctitle, verbose_ssl, verbose_auth;
+bool verbose_proctitle, verbose_ssl, verbose_auth, auth_debug;
 bool ssl_require_client_cert;
 const char *greeting, *log_format;
 const char *const *log_format_elements;
@@ -317,6 +317,7 @@ static void main_init(void)
 	verbose_proctitle = getenv("VERBOSE_PROCTITLE") != NULL;
         verbose_ssl = getenv("VERBOSE_SSL") != NULL;
         verbose_auth = getenv("VERBOSE_AUTH") != NULL;
+        auth_debug = getenv("AUTH_DEBUG") != NULL;
 	ssl_require_client_cert = getenv("SSL_REQUIRE_CLIENT_CERT") != NULL;
 
 	greeting = getenv("GREETING");
diff -r e2dad6156c34 -r a66833913957 src/master/login-process.c
--- a/src/master/login-process.c	Sat Oct 25 15:20:33 2008 +0300
+++ b/src/master/login-process.c	Sat Oct 25 16:06:34 2008 +0300
@@ -559,6 +559,8 @@ static void login_process_init_env(struc
 		env_put("VERBOSE_SSL=1");
 	if (set->server->auths->verbose)
 		env_put("VERBOSE_AUTH=1");
+	if (set->server->auths->debug)
+		env_put("AUTH_DEBUG=1");
 	require_cert = TRUE;
 	for (auth = set->server->auths; auth != NULL; auth = auth->next) {
 		if (!auth->ssl_require_client_cert)
diff -r e2dad6156c34 -r a66833913957 src/pop3-login/client-authenticate.c
--- a/src/pop3-login/client-authenticate.c	Sat Oct 25 15:20:33 2008 +0300
+++ b/src/pop3-login/client-authenticate.c	Sat Oct 25 16:06:34 2008 +0300
@@ -107,6 +107,10 @@ static bool client_handle_args(struct po
 			destuser = *args + 9;
 		else if (strncmp(*args, "pass=", 5) == 0)
 			pass = *args + 5;
+		else if (auth_debug) {
+			i_info("Ignoring unknown passdb extra field: %s",
+			       *args);
+		}
 	}
 
 	if (destuser == NULL)


More information about the dovecot-cvs mailing list