summaryrefslogtreecommitdiff
path: root/source4/winbind/wb_connect_lsa.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-10-15 19:18:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:44:48 -0500
commit42ececdfae15a34205638cc6e3ec53d6f3ac2148 (patch)
treeca9b6b82f861b11c3f0362e5bb863d7efa62f953 /source4/winbind/wb_connect_lsa.c
parent9259f9ecc0ab6fa3faeb582796d59420e71fc069 (diff)
downloadsamba-42ececdfae15a34205638cc6e3ec53d6f3ac2148.tar.gz
samba-42ececdfae15a34205638cc6e3ec53d6f3ac2148.tar.bz2
samba-42ececdfae15a34205638cc6e3ec53d6f3ac2148.zip
r11093: Implement wb_queue_domain_send: If the domain is not yet initialized, do that
first. And if a request is being processed, queue it. This correctly survived 3 endless loops with wbinfo's doing different things while starting up smbd. The number of indirections starts to become a bit scary, but what can you do without a decent programming language that provides closures :-) One thing that we might consider is to auto-generate async rpc requests that return composite_context structs instead of rpc_requests. Otherwise I'd have to write a lot of wrappers like composite_netr_LogonSamLogon_send. The alternative would be to write two versions of wb_queue_domain_send which I would like to avoid. This is cluttered enough already. Volker (This used to be commit 66c1b674f9870de73cce0e611909caf9eff34baa)
Diffstat (limited to 'source4/winbind/wb_connect_lsa.c')
-rw-r--r--source4/winbind/wb_connect_lsa.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/source4/winbind/wb_connect_lsa.c b/source4/winbind/wb_connect_lsa.c
index ef7b525c2a..82fe3b2e74 100644
--- a/source4/winbind/wb_connect_lsa.c
+++ b/source4/winbind/wb_connect_lsa.c
@@ -23,21 +23,9 @@
#include "includes.h"
#include "libcli/composite/composite.h"
-#include "libcli/smb_composite/smb_composite.h"
-#include "winbind/wb_async_helpers.h"
-#include "winbind/wb_server.h"
-#include "smbd/service_stream.h"
-
-#include "librpc/gen_ndr/nbt.h"
-#include "librpc/gen_ndr/samr.h"
-#include "lib/messaging/irpc.h"
-#include "librpc/gen_ndr/irpc.h"
-#include "librpc/gen_ndr/ndr_irpc.h"
+
#include "libcli/raw/libcliraw.h"
-#include "librpc/gen_ndr/ndr_netlogon.h"
#include "librpc/gen_ndr/ndr_lsa.h"
-#include "libcli/auth/credentials.h"
-
/* Helper to initialize LSA with a specific auth methods. Verify by opening
* the LSA policy. */
@@ -67,6 +55,7 @@ static struct composite_context *wb_init_lsa_send(struct smbcli_tree *tree,
result = talloc(NULL, struct composite_context);
if (result == NULL) goto failed;
result->state = COMPOSITE_STATE_IN_PROGRESS;
+ result->async.fn = NULL;
result->event_ctx = tree->session->transport->socket->event.ctx;
state = talloc(result, struct init_lsa_state);
@@ -205,6 +194,7 @@ struct composite_context *wb_connect_lsa_send(struct smbcli_tree *tree,
result = talloc(NULL, struct composite_context);
if (result == NULL) goto failed;
result->state = COMPOSITE_STATE_IN_PROGRESS;
+ result->async.fn = NULL;
result->event_ctx = tree->session->transport->socket->event.ctx;
state = talloc(result, struct connect_lsa_state);