added the INSUFFICIENTPRIVILEGESERROR code if a use is not in the remote desktop group

This commit is contained in:
Simon Engledew
2013-05-29 14:53:28 +01:00
parent bceec08367
commit 520f5e5e9b
2 changed files with 9 additions and 3 deletions

View File

@@ -147,6 +147,7 @@ extern int connectErrorCode;
#define MCSCONNECTINITIALERROR ERRORSTART + 7
#define TLSCONNECTERROR ERRORSTART + 8
#define AUTHENTICATIONERROR ERRORSTART + 9
#define INSUFFICIENTPRIVILEGESERROR ERRORSTART + 10
#ifdef __cplusplus
}

View File

@@ -109,12 +109,12 @@ BOOL freerdp_connect(freerdp* instance)
if (!status)
{
fprintf(stderr, "freerdp_post_connect failed\n");
if (!connectErrorCode)
{
connectErrorCode = POSTCONNECTERROR;
}
return FALSE;
}
@@ -129,7 +129,7 @@ BOOL freerdp_connect(freerdp* instance)
if (instance->update->pcap_rfx)
instance->update->play_rfx = TRUE;
update = instance->update;
while (instance->update->play_rfx && pcap_has_next_record(update->pcap_rfx))
@@ -153,6 +153,11 @@ BOOL freerdp_connect(freerdp* instance)
}
}
if (rdp->errorInfo == ERRINFO_SERVER_INSUFFICIENT_PRIVILEGES)
{
connectErrorCode = INSUFFICIENTPRIVILEGESERROR;
}
if (!connectErrorCode)
{
connectErrorCode = UNDEFINEDCONNECTERROR;