summaryrefslogtreecommitdiff
path: root/source4/lib/registry/rpc.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-15 13:44:00 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-15 13:44:00 +0100
commit163e559606d55cce63346b01498417770761dd64 (patch)
treeb04e73dd9cde159cc9912436bfc85535026e2f8d /source4/lib/registry/rpc.c
parentcc3eec1681bb6d614e688f51e48bd76f6d513e67 (diff)
downloadsamba-163e559606d55cce63346b01498417770761dd64.tar.gz
samba-163e559606d55cce63346b01498417770761dd64.tar.bz2
samba-163e559606d55cce63346b01498417770761dd64.zip
s4:registry - rpc - don't crash when communication partner isn't available
Diffstat (limited to 'source4/lib/registry/rpc.c')
-rw-r--r--source4/lib/registry/rpc.c8
1 files changed, 4 insertions, 4 deletions
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 = &reg_backend_rpc;