smbldap: Introduce "smbldap_get_ldap"
[samba.git] / source3 / winbindd / idmap_rfc2307.c
index 8ee84f7106c534aaa3eee5fed8438f1248f8b00d..ff8bf52ce81f66fafd041a21756315ce33b2f82c 100644 (file)
@@ -142,7 +142,7 @@ static NTSTATUS idmap_rfc2307_ldap_search(struct idmap_rfc2307_context *ctx,
 
        ret = smbldap_search(ctx->smbldap_state, bind_path, LDAP_SCOPE_SUBTREE,
                             expr, attrs, 0, result);
-       ctx->ldap = ctx->smbldap_state->ldap_struct;
+       ctx->ldap = smbldap_get_ldap(ctx->smbldap_state);
 
        if (ret == LDAP_SUCCESS) {
                return NT_STATUS_OK;