From 5b19070ac701dfc24ed77688373a9f071792b93c Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Thu, 29 Jun 2006 20:34:45 +0000 Subject: r16694: Store lsa rpc pipe pointer in a right place. rafal (This used to be commit fa6b52dbf7321d1a7f0fdea32ab2605951c2b35a) --- source4/libnet/libnet_rpc.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'source4') diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c index 3574559d4f..fce7811138 100644 --- a/source4/libnet/libnet_rpc.c +++ b/source4/libnet/libnet_rpc.c @@ -147,8 +147,9 @@ static NTSTATUS libnet_RpcConnectSrv_recv(struct composite_context *c, mem_ctx is freed */ if (r->in.dcerpc_iface == &dcerpc_table_samr) { ctx->samr_pipe = talloc_reference(ctx, r->out.dcerpc_pipe); - } else { - ctx->pipe = talloc_reference(ctx, r->out.dcerpc_pipe); + + } else if (r->in.dcerpc_iface == &dcerpc_table_lsarpc) { + ctx->lsa_pipe = talloc_reference(ctx, r->out.dcerpc_pipe); } } else { r->out.error_string = talloc_steal(mem_ctx, s->r.out.error_string); @@ -321,9 +322,11 @@ static NTSTATUS libnet_RpcConnectDC_recv(struct composite_context *c, mem_ctx is freed */ if (r->in.dcerpc_iface == &dcerpc_table_samr) { ctx->samr_pipe = talloc_reference(ctx, r->out.dcerpc_pipe); - } else { - ctx->pipe = talloc_reference(ctx, r->out.dcerpc_pipe); + + } else if (r->in.dcerpc_iface == &dcerpc_table_lsarpc) { + ctx->lsa_pipe = talloc_reference(ctx, r->out.dcerpc_pipe); } + } else { r->out.error_string = talloc_steal(mem_ctx, s->r.out.error_string); } @@ -432,7 +435,7 @@ static void continue_dci_rpc_connect(struct composite_context *ctx) } /* prepare to open a policy handle on lsa pipe */ - s->lsa_pipe = s->ctx->pipe; + s->lsa_pipe = s->ctx->lsa_pipe; s->qos.len = 0; s->qos.impersonation_level = 2; @@ -684,9 +687,11 @@ static NTSTATUS libnet_RpcConnectDCInfo_recv(struct composite_context *c, struct mem_ctx is freed */ if (r->in.dcerpc_iface == &dcerpc_table_samr) { ctx->samr_pipe = talloc_reference(ctx, r->out.dcerpc_pipe); - } else { - ctx->pipe = talloc_reference(ctx, r->out.dcerpc_pipe); + + } else if (r->in.dcerpc_iface == &dcerpc_table_lsarpc) { + ctx->lsa_pipe = talloc_reference(ctx, r->out.dcerpc_pipe); } + } else { r->out.error_string = talloc_steal(mem_ctx, s->r.out.error_string); } -- cgit