diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-04-16 16:10:16 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-04-16 16:10:16 +0200 |
commit | 008c8adfe3c72b4820d22421ba3df8dc80053831 (patch) | |
tree | 1fcb6290f5b24f2915ddf8f53b84b2d508114209 /source4 | |
parent | 8eaf64b47b775a9f71ae6052d5199e5c8a697226 (diff) | |
download | samba-008c8adfe3c72b4820d22421ba3df8dc80053831.tar.gz samba-008c8adfe3c72b4820d22421ba3df8dc80053831.tar.bz2 samba-008c8adfe3c72b4820d22421ba3df8dc80053831.zip |
Fix wbinfo --trusted-domains.
The problems here were that we did not bind to the LSA pipe, and we
did not consider it possible to have 0 trusted domains.
Andrew Bartlett
(This used to be commit 86694d429d62940882ac9b7af83b3e7d00e67c5a)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/winbind/wb_cmd_list_trustdom.c | 3 | ||||
-rw-r--r-- | source4/winbind/wb_connect_lsa.c | 11 |
2 files changed, 9 insertions, 5 deletions
diff --git a/source4/winbind/wb_cmd_list_trustdom.c b/source4/winbind/wb_cmd_list_trustdom.c index 83bd517a02..8d0c1bd947 100644 --- a/source4/winbind/wb_cmd_list_trustdom.c +++ b/source4/winbind/wb_cmd_list_trustdom.c @@ -143,7 +143,8 @@ static void cmd_list_trustdoms_recv_doms(struct rpc_request *req) state->domains = talloc_realloc(state, state->domains, struct wb_dom_info *, state->num_domains); - if (composite_nomem(state->domains, state->ctx)) return; + if (state->num_domains && + composite_nomem(state->domains, state->ctx)) return; for (i=0; i<state->r.out.domains->count; i++) { int j = i+old_num_domains; diff --git a/source4/winbind/wb_connect_lsa.c b/source4/winbind/wb_connect_lsa.c index 61b123a502..a728f8abe4 100644 --- a/source4/winbind/wb_connect_lsa.c +++ b/source4/winbind/wb_connect_lsa.c @@ -62,8 +62,11 @@ struct composite_context *wb_init_lsa_send(TALLOC_CTX *mem_ctx, /* this will make the secondary connection on the same IPC$ share, secured with SPNEGO or NTLMSSP */ - ctx = dcerpc_secondary_connection_send(domain->netlogon_pipe, - domain->lsa_binding); + ctx = dcerpc_secondary_auth_connection_send(domain->netlogon_pipe, + domain->lsa_binding, + &ndr_table_lsarpc, + domain->libnet_ctx->cred, + domain->libnet_ctx->lp_ctx); composite_continue(state->ctx, ctx, init_lsa_recv_pipe, state); return result; @@ -79,8 +82,8 @@ static void init_lsa_recv_pipe(struct composite_context *ctx) talloc_get_type(ctx->async.private_data, struct init_lsa_state); - state->ctx->status = dcerpc_secondary_connection_recv(ctx, - &state->lsa_pipe); + state->ctx->status = dcerpc_secondary_auth_connection_recv(ctx, state, + &state->lsa_pipe); if (!composite_is_ok(state->ctx)) return; state->handle = talloc(state, struct policy_handle); |