s4:winbind: make clear that we use the global tevent_context
authorStefan Metzmacher <metze@samba.org>
Tue, 14 Jan 2014 10:55:19 +0000 (11:55 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 16 Jan 2014 15:22:52 +0000 (16:22 +0100)
We should avoid using the tevent_context pointer on a
dcecli_connection, it's the same as the global per task one
anyway.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source4/winbind/wb_connect_lsa.c
source4/winbind/wb_connect_sam.c
source4/winbind/wb_init_domain.c
source4/winbind/wb_server.h

index 01bd23bd784c42517827e89f1a906c57df3d4526..3bf02a0ed09766c794117bfa1913fe01719f703c 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "librpc/gen_ndr/ndr_lsa_c.h"
 #include "winbind/wb_server.h"
+#include "smbd/service_task.h"
 
 /* Helper to initialize LSA with a specific auth methods. Verify by opening
  * the LSA policy. */
@@ -51,7 +52,7 @@ struct composite_context *wb_init_lsa_send(TALLOC_CTX *mem_ctx,
        struct composite_context *result, *ctx;
        struct init_lsa_state *state;
 
-       result = composite_create(mem_ctx, domain->netlogon_pipe->conn->event_ctx);
+       result = composite_create(mem_ctx, domain->service->task->event_ctx);
        if (result == NULL) goto failed;
 
        state = talloc(result, struct init_lsa_state);
index 06937b2dee3b1b72883ad6cc01130548988ff616..67d4983754e29cfce29a1ff3c2bd409af664849c 100644 (file)
@@ -26,6 +26,7 @@
 #include "libcli/security/security.h"
 #include "librpc/gen_ndr/ndr_samr_c.h"
 #include "winbind/wb_server.h"
+#include "smbd/service_task.h"
 
 
 /* Helper to initialize SAMR with a specific auth methods. Verify by opening
@@ -53,7 +54,7 @@ struct composite_context *wb_connect_samr_send(TALLOC_CTX *mem_ctx,
        struct composite_context *result, *ctx;
        struct connect_samr_state *state;
 
-       result = composite_create(mem_ctx, domain->netlogon_pipe->conn->event_ctx);
+       result = composite_create(mem_ctx, domain->service->task->event_ctx);
        if (result == NULL) goto failed;
 
        state = talloc(result, struct connect_samr_state);
index 0dda85ca4f8507db6a21b4f313428f245e9bfa1a..72a39eb83e3c8c5cdbb7b1c1a6d47a9984ca2444 100644 (file)
@@ -136,6 +136,8 @@ struct composite_context *wb_init_domain_send(TALLOC_CTX *mem_ctx,
        state->domain = talloc(state, struct wbsrv_domain);
        if (state->domain == NULL) goto failed;
 
+       state->domain->service = service;
+
        state->domain->info = talloc_reference(state->domain, dom_info);
        if (state->domain->info == NULL) goto failed;
 
index 26c404d12bdb2f684186820c7ff62c93fb4eb638..ea93de60c83edb8f5e67b64dbe5d87594301c85c 100644 (file)
@@ -56,6 +56,8 @@ struct wb_dom_info {
 struct wbsrv_domain {
        struct wbsrv_domain *next, *prev;
 
+       struct wbsrv_service *service;
+
        struct wb_dom_info *info;
 
        /* Details for the server we are currently talking to */