mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Update src/Access/LDAPClient.cpp
Co-authored-by: Denis Glazachev <traceon@users.noreply.github.com>
This commit is contained in:
parent
7084099958
commit
f818baf8f3
@ -306,10 +306,15 @@ bool LDAPClient::openConnection()
|
||||
cred.bv_val = const_cast<char *>(params.password.c_str());
|
||||
cred.bv_len = params.password.size();
|
||||
|
||||
int rc = ldap_sasl_bind_s(handle, final_bind_dn.c_str(), LDAP_SASL_SIMPLE, &cred, nullptr, nullptr, nullptr);
|
||||
{
|
||||
const auto rc = ldap_sasl_bind_s(handle, final_bind_dn.c_str(), LDAP_SASL_SIMPLE, &cred, nullptr, nullptr, nullptr);
|
||||
|
||||
// Handle invalid credentials gracefully.
|
||||
if (rc == LDAP_INVALID_CREDENTIALS)
|
||||
return false;
|
||||
|
||||
diag(rc);
|
||||
}
|
||||
|
||||
// Once bound, run the user DN search query and update the default value, if asked.
|
||||
if (params.user_dn_detection)
|
||||
|
Loading…
Reference in New Issue
Block a user