summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-04-16 16:10:16 +0200
committerAndrew Bartlett <abartlet@samba.org>2008-04-16 16:10:16 +0200
commit008c8adfe3c72b4820d22421ba3df8dc80053831 (patch)
tree1fcb6290f5b24f2915ddf8f53b84b2d508114209
parent8eaf64b47b775a9f71ae6052d5199e5c8a697226 (diff)
downloadsamba-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)
-rw-r--r--source4/winbind/wb_cmd_list_trustdom.c3
-rw-r--r--source4/winbind/wb_connect_lsa.c11
-rwxr-xr-xtestprogs/blackbox/test_wbinfo.sh5
3 files changed, 11 insertions, 8 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);
diff --git a/testprogs/blackbox/test_wbinfo.sh b/testprogs/blackbox/test_wbinfo.sh
index b309b302dd..1ece5a60f2 100755
--- a/testprogs/blackbox/test_wbinfo.sh
+++ b/testprogs/blackbox/test_wbinfo.sh
@@ -157,9 +157,8 @@ testfail "wbinfo -Y against $TARGET using invalid SID" $wbinfo -Y "S-1-22-1-3000
testit "wbinfo -t against $TARGET" $wbinfo -t || failed=`expr $failed + 1`
-# this does not work
-knownfail "wbinfo -m against $TARGET" $wbinfo -m || failed=`expr $failed + 1`
-knownfail "wbinfo --all-domains against $TARGET" $wbinfo --all-domains || failed=`expr $failed + 1`
+testit "wbinfo --trusted-domains against $TARGET" $wbinfo --trusted-domains || failed=`expr $failed + 1`
+testit "wbinfo --all-domains against $TARGET" $wbinfo --all-domains || failed=`expr $failed + 1`
testit "wbinfo --own-domain against $TARGET" $wbinfo --own-domain || failed=`expr $failed + 1`
echo "test: wbinfo --own-domain against $TARGET check output"