Skip to content

Fix on_kerberos_inquiry Deadlock

Pedro Tôrres requested to merge t0rr3sp3dr0/gnome-online-accounts:master into master

When invoking krb5_get_init_creds_password, MIT Kerberos will call a krb5_prompter_fct when a ticket is successfully acquired by a user with a password expiration set with a message such as: Warning: Your password will expire in 87 days on Sat 29 Aug 2020 03:09:35 PM -03.

GNOME's implementation set on_kerberos_inquiry to be the krb5_prompter_fct (

on_kerberos_inquiry invokes goa_kerberos_identity_inquiry_new regardless the value of number_of_prompts (

As the warning doesn't require user interaction, it is purely informational, number_of_prompts is 0 when the function is invoked for this message.

goa_kerberos_identity_inquiry_new returns NULL when checks that number_of_prompts is not greater than 0 (

on_kerberos_inquiry calls operation->inquiry_func with inquiry as NULL (

Invoking operation->inquiry_func with inquiry as NULL causes a dead-lock on wait_for_inquiry_to_complete (

A solution to this problem is to just invoke if number_of_prompts > 0, otherwise set error_code to 0.

Fixes #92 (closed)

Merge request reports