summaryrefslogtreecommitdiff
path: root/source4/winbind/wb_dom_info.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-07-16 11:27:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:01:08 -0500
commitc86e98aa8070137834f0587b613e215db8802f27 (patch)
tree1782cf9a4d8aefb40bc962adbb337da90b48682e /source4/winbind/wb_dom_info.c
parent3ccf9ff2ab468d91b9843139df2dfdccbe24c7a1 (diff)
downloadsamba-c86e98aa8070137834f0587b613e215db8802f27.tar.gz
samba-c86e98aa8070137834f0587b613e215db8802f27.tar.bz2
samba-c86e98aa8070137834f0587b613e215db8802f27.zip
r23890: Allow wbinfo -a to work against Samba4's winbind.
Add a test for wbinfo -a to test_member.sh Reimplement the server-side 'pam_auth' and 'pam_auth_crap' calls to use the same SamLogon code as auth_winbind uses. In my previous code, we did not bind to the LSA and SAMR pipes, before attempting operations. We now do this (how we passed any tests before is beyond me). This required some rework, particularly to make it easier to setup secondary connections. The new rpc_secondary_auth_connection() function also performs the bind. The dcerpc_connect.c file was getting to big, so things have been merged into dcerpc_secondary.c. Andrew Bartlett (This used to be commit 365778a993b7d76af6d53ba2a598b7e271741dc5)
Diffstat (limited to 'source4/winbind/wb_dom_info.c')
-rw-r--r--source4/winbind/wb_dom_info.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source4/winbind/wb_dom_info.c b/source4/winbind/wb_dom_info.c
index 571ecb39b2..5ec8f1a159 100644
--- a/source4/winbind/wb_dom_info.c
+++ b/source4/winbind/wb_dom_info.c
@@ -45,7 +45,7 @@ struct composite_context *wb_get_dom_info_send(TALLOC_CTX *mem_ctx,
{
struct composite_context *result, *ctx;
struct get_dom_info_state *state;
- struct dom_sid *dup_sid;
+ struct dom_sid *dom_sid;
result = composite_create(mem_ctx, service->task->event_ctx);
if (result == NULL) goto failed;
@@ -57,11 +57,17 @@ struct composite_context *wb_get_dom_info_send(TALLOC_CTX *mem_ctx,
state->info = talloc_zero(state, struct wb_dom_info);
if (state->info == NULL) goto failed;
- dup_sid = dom_sid_dup(state, sid);
- if (dup_sid == NULL) goto failed;
+ state->info->name = talloc_strdup(state->info, domain_name);
+ if (state->info->name == NULL) goto failed;
+
+ state->info->sid = dom_sid_dup(state->info, sid);
+ if (state->info->sid == NULL) goto failed;
+
+ dom_sid = dom_sid_dup(mem_ctx, sid);
+ if (dom_sid == NULL) goto failed;
ctx = finddcs_send(mem_ctx, domain_name, NBT_NAME_LOGON,
- dup_sid, lp_name_resolve_order(), service->task->event_ctx,
+ dom_sid, lp_name_resolve_order(), service->task->event_ctx,
service->task->msg_ctx);
if (ctx == NULL) goto failed;