dovecot-1.1: auth_debug_passwords: Include the password when log...

dovecot at dovecot.org dovecot at dovecot.org
Tue Jun 3 02:46:35 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/ff3adeb71d47
changeset: 7607:ff3adeb71d47
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jun 03 02:46:32 2008 +0300
description:
auth_debug_passwords: Include the password when logging about "Requested x
scheme, but we have only y".

diffstat:

1 file changed, 7 insertions(+), 1 deletion(-)
src/auth/passdb.c |    8 +++++++-

diffs (20 lines):

diff -r c88c1365b60d -r ff3adeb71d47 src/auth/passdb.c
--- a/src/auth/passdb.c	Tue Jun 03 02:17:04 2008 +0300
+++ b/src/auth/passdb.c	Tue Jun 03 02:46:32 2008 +0300
@@ -78,9 +78,15 @@ bool passdb_get_credentials(struct auth_
 
 	if (!password_scheme_is_alias(input_scheme, wanted_scheme)) {
 		if (!password_scheme_is_alias(input_scheme, "PLAIN")) {
-			auth_request_log_info(auth_request, "password",
+			const char *error = t_strdup_printf(
 				"Requested %s scheme, but we have only %s",
 				wanted_scheme, input_scheme);
+			if (auth_request->auth->verbose_debug_passwords) {
+				error = t_strdup_printf("%s (input: %s)",
+							error, input);
+			}
+			auth_request_log_info(auth_request, "password",
+					      "%s", error);
 			return FALSE;
 		}
 


More information about the dovecot-cvs mailing list