mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s3:winbind: Pass a memory context to ads_idmap_cached_connection()
Prepare to allocate ADS_STRUCT under a talloc context. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
6130d11398
commit
f4d0db0d40
@ -65,7 +65,7 @@ static ADS_STATUS ad_idmap_cached_connection(struct idmap_domain *dom)
|
||||
|
||||
ctx = talloc_get_type(dom->private_data, struct idmap_ad_context);
|
||||
|
||||
status = ads_idmap_cached_connection(&ctx->ads, dom->name);
|
||||
status = ads_idmap_cached_connection(dom->name, ctx, &ctx->ads);
|
||||
if (!ADS_ERR_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ static NTSTATUS idmap_rfc2307_ads_check_connection(struct idmap_domain *dom)
|
||||
ctx = talloc_get_type(dom->private_data, struct idmap_rfc2307_context);
|
||||
dom_name = ctx->ldap_domain ? ctx->ldap_domain : dom->name;
|
||||
|
||||
status = ads_idmap_cached_connection(&ctx->ads, dom_name);
|
||||
status = ads_idmap_cached_connection(dom_name, ctx, &ctx->ads);
|
||||
if (ADS_ERR_OK(status)) {
|
||||
ctx->ldap = ctx->ads->ldap.ld;
|
||||
} else {
|
||||
|
@ -174,7 +174,9 @@ static ADS_STATUS ads_cached_connection_connect(ADS_STRUCT **adsp,
|
||||
return status;
|
||||
}
|
||||
|
||||
ADS_STATUS ads_idmap_cached_connection(ADS_STRUCT **adsp, const char *dom_name)
|
||||
ADS_STATUS ads_idmap_cached_connection(const char *dom_name,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
ADS_STRUCT **adsp)
|
||||
{
|
||||
char *ldap_server = NULL;
|
||||
char *realm = NULL;
|
||||
|
@ -27,7 +27,8 @@
|
||||
|
||||
extern struct winbindd_methods ads_methods;
|
||||
|
||||
ADS_STATUS ads_idmap_cached_connection(ADS_STRUCT **adsp,
|
||||
const char *dom_name);
|
||||
ADS_STATUS ads_idmap_cached_connection(const char *dom_name,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
ADS_STRUCT **adsp);
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user