From ac713658d206e8d001fef7c0e36945793f2eb942 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 3 Jun 2008 02:46:32 +0300 Subject: [PATCH] auth_debug_passwords: Include the password when logging about "Requested x scheme, but we have only y". --HG-- branch : HEAD --- src/auth/passdb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; } -- 2.47.3