mirror of
https://github.com/samba-team/samba.git
synced 2025-01-28 17:47:29 +03:00
idmap_rfc2307: Fix a crash after connection problem to DC
When the connection to the DC has a problem, the code behind ads_do_search_retry closes the current connection and opens a new one. The new connection has a new struct LDAP to represent the connection. In this case, the LDAP pointer in the idmap_rfc2307_context becomes invalid. Fix this problem by updating the local pointer after calling ads_do_search_retry. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
fa9630e368
commit
304e3904f0
@ -103,6 +103,7 @@ static NTSTATUS idmap_rfc2307_ads_search(struct idmap_rfc2307_context *ctx,
|
||||
|
||||
status = ads_do_search_retry(ctx->ads, bind_path,
|
||||
LDAP_SCOPE_SUBTREE, expr, attrs, result);
|
||||
ctx->ldap = ctx->ads->ldap.ld;
|
||||
return ads_ntstatus(status);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user