diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-15 13:44:00 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-15 13:44:00 +0100 |
commit | 163e559606d55cce63346b01498417770761dd64 (patch) | |
tree | b04e73dd9cde159cc9912436bfc85535026e2f8d | |
parent | cc3eec1681bb6d614e688f51e48bd76f6d513e67 (diff) | |
download | samba-163e559606d55cce63346b01498417770761dd64.tar.gz samba-163e559606d55cce63346b01498417770761dd64.tar.bz2 samba-163e559606d55cce63346b01498417770761dd64.zip |
s4:registry - rpc - don't crash when communication partner isn't available
-rw-r--r-- | source4/lib/registry/rpc.c | 8 |
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 = ®_backend_rpc; |