mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
s4:winbind: add a netlogon_queue (tevent_queue)
This will protect the netlogon_creds later. metze
This commit is contained in:
parent
d4aa8978cc
commit
19daec6a95
@ -160,6 +160,13 @@ struct composite_context *wb_init_domain_send(TALLOC_CTX *mem_ctx,
|
||||
|
||||
state->domain->netlogon_pipe = NULL;
|
||||
|
||||
state->domain->netlogon_queue = tevent_queue_create(state->domain,
|
||||
"netlogon_queue");
|
||||
if (state->domain->netlogon_queue == NULL) goto failed;
|
||||
|
||||
/* We start the queue when the connection is usable */
|
||||
tevent_queue_stop(state->domain->netlogon_queue);
|
||||
|
||||
if ((!cli_credentials_is_anonymous(state->domain->libnet_ctx->cred)) &&
|
||||
((lpcfg_server_role(service->task->lp_ctx) == ROLE_DOMAIN_MEMBER) ||
|
||||
(lpcfg_server_role(service->task->lp_ctx) == ROLE_ACTIVE_DIRECTORY_DC)) &&
|
||||
@ -211,6 +218,9 @@ static void init_domain_recv_netlogonpipe(struct composite_context *ctx)
|
||||
}
|
||||
talloc_reparent(state, state->domain->netlogon_pipe, state->domain->netlogon_binding);
|
||||
|
||||
/* the netlogon connection is ready */
|
||||
tevent_queue_start(state->domain->netlogon_queue);
|
||||
|
||||
state->domain->lsa_binding = init_domain_binding(state, &ndr_table_lsarpc);
|
||||
|
||||
/* For debugging, it can be a real pain if all the traffic is encrypted */
|
||||
|
@ -68,6 +68,8 @@ struct wbsrv_domain {
|
||||
|
||||
struct dcerpc_pipe *netlogon_pipe;
|
||||
struct dcerpc_binding *netlogon_binding;
|
||||
/* netlogon_creds usage needs to be queued */
|
||||
struct tevent_queue *netlogon_queue;
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user