diff --git a/source3/winbindd/idmap_rfc2307.c b/source3/winbindd/idmap_rfc2307.c index 2b7a593a15c..db8bab63358 100644 --- a/source3/winbindd/idmap_rfc2307.c +++ b/source3/winbindd/idmap_rfc2307.c @@ -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); }