mirror of
https://github.com/samba-team/samba.git
synced 2025-08-24 21:49:29 +03:00
winbind: add locator_child_handle() and use it instead of child->binding_handle
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13292
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 44ebaaac89
)
This commit is contained in:
@ -37,7 +37,7 @@ struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
|
||||
{
|
||||
struct tevent_req *req, *subreq;
|
||||
struct wb_dsgetdcname_state *state;
|
||||
struct winbindd_child *child;
|
||||
struct dcerpc_binding_handle *child_binding_handle = NULL;
|
||||
struct GUID guid;
|
||||
struct GUID *guid_ptr = NULL;
|
||||
|
||||
@ -72,10 +72,10 @@ struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
|
||||
/*
|
||||
* We have to figure out the DC ourselves
|
||||
*/
|
||||
child = locator_child();
|
||||
child_binding_handle = locator_child_handle();
|
||||
} else {
|
||||
struct winbindd_domain *domain = find_our_domain();
|
||||
child = choose_domain_child(domain);
|
||||
child_binding_handle = dom_child_handle(domain);
|
||||
}
|
||||
|
||||
if (domain_guid != NULL) {
|
||||
@ -85,7 +85,7 @@ struct tevent_req *wb_dsgetdcname_send(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
subreq = dcerpc_wbint_DsGetDcName_send(
|
||||
state, ev, child->binding_handle, domain_name, guid_ptr, site_name,
|
||||
state, ev, child_binding_handle, domain_name, guid_ptr, site_name,
|
||||
flags, &state->dcinfo);
|
||||
if (tevent_req_nomem(subreq, req)) {
|
||||
return tevent_req_post(req, ev);
|
||||
|
@ -35,7 +35,7 @@ struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
|
||||
struct winbindd_request *request)
|
||||
{
|
||||
struct tevent_req *req, *subreq;
|
||||
struct winbindd_child *child;
|
||||
struct dcerpc_binding_handle *child_binding_handle = NULL;
|
||||
struct winbindd_dsgetdcname_state *state;
|
||||
struct GUID *guid_ptr = NULL;
|
||||
uint32_t ds_flags = 0;
|
||||
@ -65,10 +65,10 @@ struct tevent_req *winbindd_dsgetdcname_send(TALLOC_CTX *mem_ctx,
|
||||
guid_ptr = &state->guid;
|
||||
}
|
||||
|
||||
child = locator_child();
|
||||
child_binding_handle = locator_child_handle();
|
||||
|
||||
subreq = dcerpc_wbint_DsGetDcName_send(
|
||||
state, ev, child->binding_handle,
|
||||
state, ev, child_binding_handle,
|
||||
request->data.dsgetdcname.domain_name, guid_ptr,
|
||||
request->data.dsgetdcname.site_name,
|
||||
ds_flags, &state->dc_info);
|
||||
|
@ -34,6 +34,11 @@ struct winbindd_child *locator_child(void)
|
||||
return &static_locator_child;
|
||||
}
|
||||
|
||||
struct dcerpc_binding_handle *locator_child_handle(void)
|
||||
{
|
||||
return static_locator_child.binding_handle;
|
||||
}
|
||||
|
||||
static const struct winbindd_child_dispatch_table locator_dispatch_table[] = {
|
||||
{
|
||||
.name = "PING",
|
||||
|
@ -367,6 +367,7 @@ bool lp_scan_idmap_domains(bool (*fn)(const char *domname,
|
||||
|
||||
void init_locator_child(void);
|
||||
struct winbindd_child *locator_child(void);
|
||||
struct dcerpc_binding_handle *locator_child_handle(void);
|
||||
|
||||
/* The following definitions come from winbindd/winbindd_misc.c */
|
||||
|
||||
|
Reference in New Issue
Block a user