From 584b15218536807eac19b351e569944399b53eb9 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Fri, 15 Mar 2024 12:35:00 +0100 Subject: [PATCH] krb5: make prompter and pre-auth debug message less irritating Resolves: https://github.com/SSSD/sssd/issues/7152 --- src/providers/krb5/krb5_child.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c index 9d9a459effa..b10abe68357 100644 --- a/src/providers/krb5/krb5_child.c +++ b/src/providers/krb5/krb5_child.c @@ -1346,7 +1346,7 @@ static krb5_error_code sss_krb5_prompter(krb5_context context, void *data, } DEBUG(SSSDBG_TRACE_ALL, - "sss_krb5_prompter name [%s] banner [%s] num_prompts [%d] EINVAL.\n", + "sss_krb5_prompter name [%s] banner [%s] num_prompts [%d].\n", name, banner, num_prompts); if (num_prompts != 0) { @@ -1355,7 +1355,10 @@ static krb5_error_code sss_krb5_prompter(krb5_context context, void *data, prompts[c].prompt); } - DEBUG(SSSDBG_FUNC_DATA, "Prompter interface isn't used for password prompts by SSSD.\n"); + DEBUG(SSSDBG_FUNC_DATA, + "Prompter interface isn't used for prompting by SSSD." + "Error [%ld/%s] is expected.\n", KRB5_LIBOS_CANTREADPWD, + krb5_get_error_message(context, KRB5_LIBOS_CANTREADPWD)); return KRB5_LIBOS_CANTREADPWD; } @@ -2824,8 +2827,9 @@ static errno_t tgt_req_child(struct krb5_req *kr) * should now know which authentication methods are available to * update the password. */ DEBUG(SSSDBG_TRACE_FUNC, - "krb5_get_init_creds_password returned [%d] during pre-auth, " - "ignored.\n", kerr); + "krb5_get_init_creds_password returned [%d] while collecting " + "available authentication types, errors are expected " + "and ignored.\n", kerr); ret = pam_add_prompting(kr); if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, "pam_add_prompting failed.\n");