libfreerdp-core: fix usage of proper gateway credentials
This commit is contained in:
parent
0047511055
commit
8267f2cb88
@ -1319,6 +1319,21 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
|
||||
if (settings->DisableThemes)
|
||||
settings->PerformanceFlags |= PERF_DISABLE_THEMING;
|
||||
|
||||
if (settings->GatewayUsageMethod)
|
||||
{
|
||||
if (settings->GatewayUseSameCredentials)
|
||||
{
|
||||
if (settings->Username)
|
||||
settings->GatewayUsername = _strdup(settings->Username);
|
||||
|
||||
if (settings->Domain)
|
||||
settings->GatewayDomain = _strdup(settings->Domain);
|
||||
|
||||
if (settings->Password)
|
||||
settings->GatewayPassword = _strdup(settings->Password);
|
||||
}
|
||||
}
|
||||
|
||||
arg = CommandLineFindArgumentA(args, "p");
|
||||
|
||||
if (arg->Flags & COMMAND_LINE_ARGUMENT_PRESENT)
|
||||
|
@ -122,16 +122,8 @@ int rpc_ncacn_http_ntlm_init(rdpRpc* rpc, TSG_CHANNEL channel)
|
||||
else if (channel == TSG_CHANNEL_OUT)
|
||||
ntlm = rpc->NtlmHttpOut->ntlm;
|
||||
|
||||
if (settings->GatewayUseSameCredentials)
|
||||
{
|
||||
ntlm_client_init(ntlm, TRUE, settings->Username,
|
||||
settings->Domain, settings->Password);
|
||||
}
|
||||
else
|
||||
{
|
||||
ntlm_client_init(ntlm, TRUE, settings->GatewayUsername,
|
||||
ntlm_client_init(ntlm, TRUE, settings->GatewayUsername,
|
||||
settings->GatewayDomain, settings->GatewayPassword);
|
||||
}
|
||||
|
||||
//ntlm_client_make_spn(ntlm, NULL, settings->GatewayHostname);
|
||||
ntlm_client_make_spn(ntlm, _T("HTTP"), settings->GatewayHostname);
|
||||
|
@ -102,7 +102,7 @@ int rpc_send_bind_pdu(rdpRpc* rpc)
|
||||
|
||||
rpc->ntlm = ntlm_new();
|
||||
|
||||
ntlm_client_init(rpc->ntlm, FALSE, settings->Username, settings->Domain, settings->Password);
|
||||
ntlm_client_init(rpc->ntlm, FALSE, settings->GatewayUsername, settings->GatewayDomain, settings->GatewayPassword);
|
||||
ntlm_client_make_spn(rpc->ntlm, NULL, settings->GatewayHostname);
|
||||
|
||||
ntlm_authenticate(rpc->ntlm);
|
||||
|
Loading…
x
Reference in New Issue
Block a user