From 163e559606d55cce63346b01498417770761dd64 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Mon, 15 Mar 2010 13:44:00 +0100 Subject: s4:registry - rpc - don't crash when communication partner isn't available --- source4/lib/registry/rpc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/lib/registry/rpc.c') diff --git a/source4/lib/registry/rpc.c b/source4/lib/registry/rpc.c index e201380033..f3be79b9ea 100644 --- a/source4/lib/registry/rpc.c +++ b/source4/lib/registry/rpc.c @@ -497,11 +497,8 @@ _PUBLIC_ WERROR reg_open_remote(struct registry_context **ctx, status = dcerpc_pipe_connect(rctx /* TALLOC_CTX */, &p, location, - &ndr_table_winreg, + &ndr_table_winreg, credentials, ev, lp_ctx); - rctx->pipe = p; - rctx->binding_handle = p->binding_handle; - if(NT_STATUS_IS_ERR(status)) { DEBUG(1, ("Unable to open '%s': %s\n", location, nt_errstr(status))); @@ -510,6 +507,9 @@ _PUBLIC_ WERROR reg_open_remote(struct registry_context **ctx, return ntstatus_to_werror(status); } + rctx->pipe = p; + rctx->binding_handle = p->binding_handle; + *ctx = (struct registry_context *)rctx; (*ctx)->ops = ®_backend_rpc; -- cgit