s4:rpc_server/remote: reformat code to get "dcerpc_remote:binding"
authorStefan Metzmacher <metze@samba.org>
Wed, 21 Nov 2018 18:13:50 +0000 (19:13 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 12 Jan 2019 02:13:38 +0000 (03:13 +0100)
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 <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/rpc_server/remote/dcesrv_remote.c

index a3611adcb91e1fbc700b5b33544f0e9062ae721d..6967216554bf146135f4545745d32d8835b4b62c 100644 (file)
@@ -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;
        }