From: Timo Sirainen Date: Mon, 2 Jun 2008 23:46:32 +0000 (+0300) Subject: auth_debug_passwords: Include the password when logging about "Requested x X-Git-Tag: 1.2.alpha1~363^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac713658d206e8d001fef7c0e36945793f2eb942;p=thirdparty%2Fdovecot%2Fcore.git auth_debug_passwords: Include the password when logging about "Requested x scheme, but we have only y". --HG-- branch : HEAD --- diff --git a/src/auth/passdb.c b/src/auth/passdb.c index 8ea4b56c89..9deb15ae53 100644 --- a/src/auth/passdb.c +++ b/src/auth/passdb.c @@ -78,9 +78,15 @@ bool passdb_get_credentials(struct auth_request *auth_request, 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; }