summaryrefslogtreecommitdiff
path: root/source4/winbind
diff options
context:
space:
mode:
Diffstat (limited to 'source4/winbind')
-rw-r--r--source4/winbind/wb_samba3_cmd.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source4/winbind/wb_samba3_cmd.c b/source4/winbind/wb_samba3_cmd.c
index 570a166532..5dbb63696a 100644
--- a/source4/winbind/wb_samba3_cmd.c
+++ b/source4/winbind/wb_samba3_cmd.c
@@ -257,6 +257,12 @@ static void wbsrv_samba3_check_machacc_receive_tree(struct composite_context *ac
}
}
+static void delete_pipe(struct event_context *ctx, struct timed_event *te,
+ struct timeval tv, void *p)
+{
+ talloc_free(p);
+}
+
static void wbsrv_samba3_check_machacc_receive_creds(struct composite_context *action)
{
struct wbsrv_samba3_call *s3call =
@@ -271,13 +277,22 @@ static void wbsrv_samba3_check_machacc_receive_creds(struct composite_context *a
NTSTATUS status;
status = wb_get_schannel_creds_recv(action, service);
- service->netlogon = state->getcreds->out.netlogon;
talloc_unlink(state, state->conn->out.tree); /* The pipe owns it now */
state->conn->out.tree = NULL;
- if (!NT_STATUS_IS_OK(status)) goto done;
+ if (!NT_STATUS_IS_OK(status)) {
+ /* Nasty hack awaiting a proper fix. So far we can not
+ * delete a pipe from an async rpc callback which where we are
+ * in right now, so delete the pipe in 5 seconds.... :-) */
+ event_add_timed(s3call->call->event_ctx, service,
+ timeval_current_ofs(5, 0),
+ delete_pipe, state->getcreds->out.netlogon);
+ service->netlogon = NULL;
+ goto done;
+ }
+ service->netlogon = state->getcreds->out.netlogon;
s3call->response.result = WINBINDD_OK;
done:
if (!NT_STATUS_IS_OK(status)) {