[SCM] Samba Shared Repository - branch master updated
Christof Schmitt
cs at samba.org
Wed Oct 1 11:21:03 MDT 2014
The branch, master has been updated
via 7f17e01 idmap_rfc2307: Remove unsed parameter and variable
via 304e390 idmap_rfc2307: Fix a crash after connection problem to DC
from fa9630e regedit: remove an old comment
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 7f17e017b5fba4a9a83457c83c0c2d6bb88c7381
Author: Christof Schmitt <cs at samba.org>
Date: Wed Sep 17 13:28:19 2014 -0700
idmap_rfc2307: Remove unsed parameter and variable
Signed-off-by: Christof Schmitt <cs at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
Autobuild-User(master): Christof Schmitt <cs at samba.org>
Autobuild-Date(master): Wed Oct 1 19:20:50 CEST 2014 on sn-devel-104
commit 304e3904f0bfca468862e576fde9b0922c66de07
Author: Christof Schmitt <cs at samba.org>
Date: Wed Sep 17 13:23:11 2014 -0700
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 at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/winbindd/idmap_rfc2307.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/winbindd/idmap_rfc2307.c b/source3/winbindd/idmap_rfc2307.c
index 2b7a593..c04dfac 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);
}
@@ -550,7 +551,6 @@ static struct id_map* idmap_rfc2307_find_map(struct idmap_rfc2307_map *maps,
static void idmap_rfc2307_map_xid_results(struct idmap_rfc2307_context *ctx,
TALLOC_CTX *mem_ctx,
- struct id_map **ids,
struct idmap_rfc2307_map *maps,
LDAPMessage *result,
struct idmap_domain *dom,
@@ -621,7 +621,7 @@ static NTSTATUS idmap_rfc2307_sids_to_unixids(struct idmap_domain *dom,
struct idmap_rfc2307_context *ctx;
TALLOC_CTX *mem_ctx;
struct idmap_rfc2307_map *int_maps;
- int cnt_usr = 0, cnt_grp = 0, idx = 0, bidx = 0;
+ int cnt_usr = 0, cnt_grp = 0, idx = 0;
char *fltr_usr = NULL, *fltr_grp = NULL;
NTSTATUS ret;
int i;
@@ -721,9 +721,8 @@ again:
goto out;
}
- idmap_rfc2307_map_xid_results(ctx, mem_ctx, &ids[bidx],
- int_maps, result, dom,
- attrs, ID_TYPE_UID);
+ idmap_rfc2307_map_xid_results(ctx, mem_ctx, int_maps,
+ result, dom, attrs, ID_TYPE_UID);
cnt_usr = 0;
TALLOC_FREE(fltr_usr);
@@ -745,9 +744,8 @@ again:
goto out;
}
- idmap_rfc2307_map_xid_results(ctx, mem_ctx, &ids[bidx],
- int_maps, result, dom,
- attrs, ID_TYPE_GID);
+ idmap_rfc2307_map_xid_results(ctx, mem_ctx, int_maps, result,
+ dom, attrs, ID_TYPE_GID);
cnt_grp = 0;
TALLOC_FREE(fltr_grp);
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list