Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS Gateway Support (working!) #850

Merged
merged 28 commits into from Dec 13, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
875c556
libfreerdp-core: change interlocked singly-linked list to synchronize…
awakecoding Dec 5, 2012
5a13168
libwinpr-utils: implement ArrayList
awakecoding Dec 5, 2012
b92d2cf
libwinpr-utils/collections: stubbed more classes
awakecoding Dec 6, 2012
98c4cb5
libfreerdp-core: set TSG non-blocking mode
awakecoding Dec 6, 2012
2215e0a
libfreerdp-core: improve comments for TS Gateway
awakecoding Dec 7, 2012
2f61925
libfreerdp-core: map DCE error codes
awakecoding Dec 7, 2012
be98cff
libwinpr-utils: fix ArrayList
awakecoding Dec 8, 2012
731e606
libfreerdp-core: start handling client call state
awakecoding Dec 8, 2012
282c950
libfreerdp-core: fix pipe call id check
awakecoding Dec 8, 2012
db01d94
Merge branch 'master' of github.com:FreeRDP/FreeRDP
awakecoding Dec 8, 2012
7f1a5ab
libfreerdp-core: fix TSG synchronous receive
awakecoding Dec 8, 2012
c4e06eb
libwinpr-utils: refactor winpr stream utils
awakecoding Dec 10, 2012
6e07570
libwinpr-utils: simplify stream utils
awakecoding Dec 10, 2012
424ac18
libwinpr-utils: simplify winpr stream utils even more
awakecoding Dec 10, 2012
0f3d80d
libfreerdp-core: start implementation of asynchronous RPC fragment re…
awakecoding Dec 10, 2012
db91555
libfreerdp-core: improved TSG asynchronicity
awakecoding Dec 10, 2012
8aa1143
libfreerdp-core: work around PDU corruption issue with TSG, still exp…
awakecoding Dec 11, 2012
dc978a9
libfreerdp-core: improve receiving of TSG data
awakecoding Dec 12, 2012
3aeb9eb
libfreerdp-core: TSG partial cleanup
awakecoding Dec 12, 2012
d3e0537
libfreerdp-core: more TSG memory cleanup
awakecoding Dec 12, 2012
387a152
libfreerdp-core: TSG reassembly refactoring
awakecoding Dec 12, 2012
892a550
xfreerdp-server: partial fix
awakecoding Dec 12, 2012
102abcb
libfreerdp-core: improve TSG memory cleanup
awakecoding Dec 13, 2012
7ff2be0
libfreerdp-core: more TSG memory cleanup
awakecoding Dec 13, 2012
52353e2
libfreerdp-core: TSG printf cleanup
awakecoding Dec 13, 2012
6450ecd
libfreerdp-core: fix windows build
awakecoding Dec 13, 2012
c428d1c
libfreerdp-core: fix build on linux
awakecoding Dec 13, 2012
a12925e
libfreerdp-core: merging with master
awakecoding Dec 13, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions client/common/cmdline.c
Expand Up @@ -1298,6 +1298,20 @@ int freerdp_client_parse_command_line_arguments(int argc, char** argv, rdpSettin
if (settings->DisableThemes)
settings->PerformanceFlags |= PERF_DISABLE_THEMING;

arg = CommandLineFindArgumentA(args, "p");

if (arg->Flags & COMMAND_LINE_ARGUMENT_PRESENT)
{
FillMemory(arg->Value, strlen(arg->Value), '*');
}

arg = CommandLineFindArgumentA(args, "gp");

if (arg->Flags & COMMAND_LINE_ARGUMENT_PRESENT)
{
FillMemory(arg->Value, strlen(arg->Value), '*');
}

return 1;
}

Expand Down
3 changes: 0 additions & 3 deletions libfreerdp/core/CMakeLists.txt
Expand Up @@ -25,9 +25,6 @@ include_directories(${ZLIB_INCLUDE_DIRS})

set(${MODULE_PREFIX}_GATEWAY_DIR "gateway")

include_directories(".")
include_directories(${${MODULE_PREFIX}_GATEWAY_DIR})

set(${MODULE_PREFIX}_GATEWAY_SRCS
${${MODULE_PREFIX}_GATEWAY_DIR}/tsg.c
${${MODULE_PREFIX}_GATEWAY_DIR}/tsg.h
Expand Down
1 change: 1 addition & 0 deletions libfreerdp/core/connection.c
Expand Up @@ -104,6 +104,7 @@ BOOL rdp_client_connect(rdpRdp* rdp)
cookie[cookie_length] = '\0';

nego_set_cookie(rdp->nego, cookie);
free(cookie);

settings->RdpSecurity = TRUE;
settings->TlsSecurity = FALSE;
Expand Down
8 changes: 8 additions & 0 deletions libfreerdp/core/gateway/http.c
Expand Up @@ -108,7 +108,9 @@ void http_context_free(HttpContext* http_context)
{
free(http_context->UserAgent);
free(http_context->Host);
free(http_context->URI);
free(http_context->Accept);
free(http_context->Method);
free(http_context->CacheControl);
free(http_context->Connection);
free(http_context->Pragma);
Expand Down Expand Up @@ -267,6 +269,10 @@ void http_request_free(HttpRequest* http_request)
{
if (http_request != NULL)
{
free(http_request->AuthParam);
free(http_request->AuthScheme);
free(http_request->Authorization);
free(http_request->Content);
free(http_request->Method);
free(http_request->URI);
free(http_request);
Expand Down Expand Up @@ -397,10 +403,12 @@ HttpResponse* http_response_recv(rdpTls* tls)

nbytes = 0;
length = 10000;
content = NULL;
buffer = malloc(length);
http_response = http_response_new();

p = buffer;
http_response->ContentLength = 0;

while (TRUE)
{
Expand Down
4 changes: 4 additions & 0 deletions libfreerdp/core/gateway/ncacn_http.c
Expand Up @@ -159,6 +159,8 @@ BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc)
ntlm_client_uninit(ntlm);
ntlm_free(ntlm);

rpc->NtlmHttpIn->ntlm = NULL;

return TRUE;
}

Expand Down Expand Up @@ -276,5 +278,7 @@ void ntlm_http_free(rdpNtlmHttp* ntlm_http)
{
ntlm_free(ntlm_http->ntlm);
http_context_free(ntlm_http->context);

free(ntlm_http);
}
}
19 changes: 18 additions & 1 deletion libfreerdp/core/gateway/ntlm.c
Expand Up @@ -195,6 +195,12 @@ BOOL ntlm_authenticate(rdpNtlm* ntlm)
{
SECURITY_STATUS status;

if (ntlm->outputBuffer.pvBuffer)
{
free(ntlm->outputBuffer.pvBuffer);
ntlm->outputBuffer.pvBuffer = NULL;
}

ntlm->outputBufferDesc.ulVersion = SECBUFFER_VERSION;
ntlm->outputBufferDesc.cBuffers = 1;
ntlm->outputBufferDesc.pBuffers = &ntlm->outputBuffer;
Expand Down Expand Up @@ -235,6 +241,11 @@ BOOL ntlm_authenticate(rdpNtlm* ntlm)
status = SEC_I_CONTINUE_NEEDED;
}

if (ntlm->haveInputBuffer)
{
free(ntlm->inputBuffer.pvBuffer);
}

ntlm->haveInputBuffer = TRUE;
ntlm->haveContext = TRUE;

Expand All @@ -243,8 +254,14 @@ BOOL ntlm_authenticate(rdpNtlm* ntlm)

void ntlm_client_uninit(rdpNtlm* ntlm)
{
free(ntlm->identity.User);
free(ntlm->identity.Domain);
free(ntlm->identity.Password);
free(ntlm->ServicePrincipalName);

ntlm->table->FreeCredentialsHandle(&ntlm->credentials);
ntlm->table->FreeContextBuffer(ntlm->pPackageInfo);
ntlm->table->DeleteSecurityContext(&ntlm->context);
}

rdpNtlm* ntlm_new()
Expand All @@ -263,6 +280,6 @@ void ntlm_free(rdpNtlm* ntlm)
{
if (ntlm != NULL)
{

free(ntlm);
}
}
5 changes: 3 additions & 2 deletions libfreerdp/core/gateway/ntlm.h
Expand Up @@ -25,10 +25,11 @@
typedef struct rdp_ntlm rdpNtlm;
typedef struct rdp_ntlm_http rdpNtlmHttp;

#include "tcp.h"
#include "../tcp.h"
#include "../transport.h"

#include "rts.h"
#include "http.h"
#include "transport.h"

#include <time.h>
#include <winpr/sspi.h>
Expand Down