summaryrefslogtreecommitdiff
path: root/source4/winbind
diff options
context:
space:
mode:
Diffstat (limited to 'source4/winbind')
-rw-r--r--source4/winbind/wb_cmd_list_trustdom.c3
-rw-r--r--source4/winbind/wb_connect_lsa.c11
-rw-r--r--source4/winbind/wb_samba3_cmd.c9
3 files changed, 14 insertions, 9 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/source4/winbind/wb_samba3_cmd.c b/source4/winbind/wb_samba3_cmd.c
index 8ae330df35..7f1520a3b3 100644
--- a/source4/winbind/wb_samba3_cmd.c
+++ b/source4/winbind/wb_samba3_cmd.c
@@ -43,13 +43,14 @@ static void wbsrv_samba3_async_auth_epilogue(NTSTATUS status,
struct winbindd_response *resp = &s3call->response;
if (!NT_STATUS_IS_OK(status)) {
resp->result = WINBINDD_ERROR;
- WBSRV_SAMBA3_SET_STRING(resp->data.auth.nt_status_string,
- nt_errstr(status));
- WBSRV_SAMBA3_SET_STRING(resp->data.auth.error_string,
- get_friendly_nt_error_msg(status));
} else {
resp->result = WINBINDD_OK;
}
+
+ WBSRV_SAMBA3_SET_STRING(resp->data.auth.nt_status_string,
+ nt_errstr(status));
+ WBSRV_SAMBA3_SET_STRING(resp->data.auth.error_string,
+ get_friendly_nt_error_msg(status));
resp->data.auth.pam_error = nt_status_to_pam(status);
resp->data.auth.nt_status = NT_STATUS_V(status);