You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#34679835 authentication_ldap_sasl_client infinite loop on error
When authentication via sasl fails (the user can't be found in a
kerberos server), the sasl_authenticate() function enters an infinite
loop.
Enabling debugging via AUTHENTICATION_LDAP_CLIENT_LOG=5 shows that
[DBG] : Sasl_client::SaslStart sasl output: ...
[DBG] : Sasl_client::SendSaslRequestToServer length:570 request: ...
[Error] : Sasl_client::SendSaslRequestToServer: sasl response read
failed
but that "read failed" doesn't abort the loop.
Instead, the same message is sent again and now the write fails:
[DBG] : Sasl_client::SaslStart sasl output: ...
[DBG] : Sasl_client::SendSaslRequestToServer length:570 request: ...
[Error] : Sasl_client::SendSaslRequestToServer: sasl response write
failed
It loops in sasl_authenticate() as the function checks for 'rc_auth < 0',
if it shall leave the loop, but send_sasl_to_server returns 0 for
success and 1 for error.
Change
------
- leave the loop if 1 (error) is returned, instead of "rc_auth < 0"
- added doc-comments
Change-Id: I74ed37ea916ff8bea92cddd59638551080a077b1
0 commit comments