Skip to content

kerberos-identity: Handle information-only prompts when signing in

When signing in a Kerberos identity, krb5_get_init_creds_password invokes the krb5_prompter_fct callback when it wants to interact with the user. In this case the prompter callback is on_kerberos_inquiry.

Interactions with the user can either prompt the user to provide some further information, like a password, or they might be purely informational. In the latter case, the prompter callback is called with number_of_prompts set to 0. When this happens, the GoaKerberosIdentity instance waits for the user to respond, even if the GoaIdentityInquiry doesn't have anything in it for the user to respond to. This leads to a deadlock.

In practice, such purely informational messages are non-critical. eg., it might be about notifying the user when her password is about to expire. Moreover, the current Online Accounts user interface in Settings doesn't have a good way to present this sort of information, because it's only available after the user has entered the password through the user interface.

Therefore, information-only prompts are handled by turning the prompter callback into a NOP, which returns success without doing anything else.

#92 (closed)

Fix-up for !50 (closed)

Merge request reports