diff options
author | Christof Schmitt <cs@samba.org> | 2014-09-17 13:23:11 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2014-10-09 21:23:05 +0200 |
commit | 2cd2490f356fcb3642aa1bd60729f69906ffca81 (patch) | |
tree | 62a6b0fe7abd80f865e7452dcee26257cb3a85c7 /source3 | |
parent | 043415e1d69db9bc81f4a51cc392529d58955004 (diff) | |
download | samba-2cd2490f356fcb3642aa1bd60729f69906ffca81.tar.gz |
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>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10837
winbind crash in idmap_rfc2307 module
Diffstat (limited to 'source3')
-rw-r--r-- | source3/winbindd/idmap_rfc2307.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/winbindd/idmap_rfc2307.c b/source3/winbindd/idmap_rfc2307.c index 2b7a593a15..db8bab6335 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); } |