diff --git a/client/common/client.c b/client/common/client.c index a19205ec3..ad024b187 100644 --- a/client/common/client.c +++ b/client/common/client.c @@ -876,6 +876,9 @@ BOOL client_cli_present_gateway_message(freerdp* instance, UINT32 type, BOOL isD } #endif + if (freerdp_settings_get_bool(instance->context->settings, FreeRDP_GatewayAutoConsent)) + return TRUE; + while (isConsentMandatory) { printf("I understand and agree to the terms of this policy (Y/N) \n"); diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index ce403c53b..c45b6185a 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -791,6 +791,7 @@ typedef struct #define FreeRDP_GatewayAcceptedCertLength (1999) #define FreeRDP_GatewayHttpUseWebsockets (2000) #define FreeRDP_GatewayHttpExtAuthSspiNtlm (2001) +#define FreeRDP_GatewayAutoConsent (2002) #define FreeRDP_ProxyType (2015) #define FreeRDP_ProxyHostname (2016) #define FreeRDP_ProxyPort (2017) @@ -1366,7 +1367,8 @@ struct rdp_settings ALIGN64 UINT32 GatewayAcceptedCertLength; /* 1999 */ ALIGN64 BOOL GatewayHttpUseWebsockets; /* 2000 */ ALIGN64 BOOL GatewayHttpExtAuthSspiNtlm; /* 2001 */ - UINT64 padding2015[2015 - 2002]; /* 2002 */ + ALIGN64 BOOL GatewayAutoConsent; /* 2002 */ + UINT64 padding2015[2015 - 2003]; /* 2003 */ /* Proxy */ ALIGN64 UINT32 ProxyType; /* 2015 */ diff --git a/libfreerdp/common/settings_getters.c b/libfreerdp/common/settings_getters.c index 58e56ba40..f80c9c290 100644 --- a/libfreerdp/common/settings_getters.c +++ b/libfreerdp/common/settings_getters.c @@ -231,6 +231,9 @@ BOOL freerdp_settings_get_bool(const rdpSettings* settings, size_t id) case FreeRDP_Fullscreen: return settings->Fullscreen; + case FreeRDP_GatewayAutoConsent: + return settings->GatewayAutoConsent; + case FreeRDP_GatewayBypassLocal: return settings->GatewayBypassLocal; @@ -846,6 +849,10 @@ BOOL freerdp_settings_set_bool(rdpSettings* settings, size_t id, BOOL val) settings->Fullscreen = cnv.c; break; + case FreeRDP_GatewayAutoConsent: + settings->GatewayAutoConsent = cnv.c; + break; + case FreeRDP_GatewayBypassLocal: settings->GatewayBypassLocal = cnv.c; break; diff --git a/libfreerdp/common/settings_str.c b/libfreerdp/common/settings_str.c index 2d41c41c7..ad36655ab 100644 --- a/libfreerdp/common/settings_str.c +++ b/libfreerdp/common/settings_str.c @@ -103,6 +103,7 @@ static const struct settings_str_entry settings_map[] = { { FreeRDP_FrameMarkerCommandEnabled, FREERDP_SETTINGS_TYPE_BOOL, "FreeRDP_FrameMarkerCommandEnabled" }, { FreeRDP_Fullscreen, FREERDP_SETTINGS_TYPE_BOOL, "FreeRDP_Fullscreen" }, + { FreeRDP_GatewayAutoConsent, FREERDP_SETTINGS_TYPE_BOOL, "FreeRDP_GatewayAutoConsent" }, { FreeRDP_GatewayBypassLocal, FREERDP_SETTINGS_TYPE_BOOL, "FreeRDP_GatewayBypassLocal" }, { FreeRDP_GatewayEnabled, FREERDP_SETTINGS_TYPE_BOOL, "FreeRDP_GatewayEnabled" }, { FreeRDP_GatewayHttpExtAuthSspiNtlm, FREERDP_SETTINGS_TYPE_BOOL, diff --git a/libfreerdp/core/test/settings_property_lists.h b/libfreerdp/core/test/settings_property_lists.h index 056a1b4fe..9ac866504 100644 --- a/libfreerdp/core/test/settings_property_lists.h +++ b/libfreerdp/core/test/settings_property_lists.h @@ -61,6 +61,7 @@ static const size_t bool_list_indices[] = { FreeRDP_ForceMultimon, FreeRDP_FrameMarkerCommandEnabled, FreeRDP_Fullscreen, + FreeRDP_GatewayAutoConsent, FreeRDP_GatewayBypassLocal, FreeRDP_GatewayEnabled, FreeRDP_GatewayHttpExtAuthSspiNtlm,