Skip to content

LDAP: match on tuples instead of the #eldap_search_result record for OTP 24.3 compat (backport #4285) #4286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,12 @@ dn_lookup(Username, LDAP) ->
{attributes, ["distinguishedName"]}]) of
{ok, {referral, Referrals}} ->
{error, {referrals_not_supported, Referrals}};
{ok, #eldap_search_result{entries = [#eldap_entry{object_name = DN}]}}->
%% support #eldap_search_result before and after
%% https://github.com/erlang/otp/pull/5538
{ok, {eldap_search_result, [#eldap_entry{object_name = DN}], _Referrals}}->
?L1("DN lookup: ~s -> ~s", [Username, DN]),
DN;
{ok, {eldap_search_result, [#eldap_entry{object_name = DN}], _Referrals, _Controls}}->
?L1("DN lookup: ~s -> ~s", [Username, DN]),
DN;
{ok, #eldap_search_result{entries = Entries}} ->
Expand Down