From: Stefan Metzmacher Date: Wed, 21 Nov 2018 18:13:50 +0000 (+0100) Subject: s4:rpc_server/remote: reformat code to get "dcerpc_remote:binding" X-Git-Tag: talloc-2.1.15~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9b88ccd8110e5dc6a09e5f29fbffb2c5b41e3c3;p=thirdparty%2Fsamba.git s4:rpc_server/remote: reformat code to get "dcerpc_remote:binding" BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113 BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source4/rpc_server/remote/dcesrv_remote.c b/source4/rpc_server/remote/dcesrv_remote.c index a3611adcb91..6967216554b 100644 --- a/source4/rpc_server/remote/dcesrv_remote.c +++ b/source4/rpc_server/remote/dcesrv_remote.c @@ -45,7 +45,7 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct const struct ndr_interface_table *table = (const struct ndr_interface_table *)dce_call->context->iface->private_data; struct dcesrv_remote_private *priv; - const char *binding = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_remote", "binding"); + const char *binding = NULL; const char *user, *pass, *domain; struct cli_credentials *credentials; bool must_free_credentials = false; @@ -64,7 +64,11 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct priv->c_pipe = NULL; dce_call->context->private_data = priv; - if (!binding) { + binding = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, + NULL, + "dcerpc_remote", + "binding"); + if (binding == NULL) { DEBUG(0,("You must specify a DCE/RPC binding string\n")); return NT_STATUS_INVALID_PARAMETER; }