s3-ntlmssp split auth_ntlmssp_client_start() into two parts
[ira/wip.git] / source3 / rpc_client / cli_pipe.c
index 247e4867f97cde0f49f833a051136f249b3c50cd..94e4a5106f7c5c44027499492d4a338ba88bfdda 100644 (file)
@@ -2283,11 +2283,8 @@ static NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
                goto fail;
        }
 
-       status = auth_ntlmssp_client_start(result,
-                                     lp_netbios_name(),
-                                     lp_workgroup(),
-                                     lp_client_ntlmv2_auth(),
-                                     &ntlmssp_ctx);
+       status = auth_ntlmssp_client_prepare(result,
+                                            &ntlmssp_ctx);
        if (!NT_STATUS_IS_OK(status)) {
                goto fail;
        }
@@ -2313,6 +2310,11 @@ static NTSTATUS rpccli_ntlmssp_bind_data(TALLOC_CTX *mem_ctx,
                auth_ntlmssp_want_feature(ntlmssp_ctx, NTLMSSP_FEATURE_SEAL);
        }
 
+       status = auth_ntlmssp_client_start(ntlmssp_ctx);
+       if (!NT_STATUS_IS_OK(status)) {
+               goto fail;
+       }
+
        result->auth_ctx = ntlmssp_ctx;
        *presult = result;
        return NT_STATUS_OK;