Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Panozzo <giovanni@panozzo.it>2017-06-01 00:34:13 +0300
committerGiovanni Panozzo <giovanni@panozzo.it>2017-06-01 00:34:13 +0300
commitef07621c7a7dcb970b42b4515759c18c2aac5579 (patch)
tree3cb0b56ecbbf508e839c9f5ffcc22d4676393fcf /remmina-plugins
parent41c8de665ffc048756ea41b6b8ecab8b02e183d2 (diff)
RDP: remove server hostname DNS check
Diffstat (limited to 'remmina-plugins')
-rw-r--r--remmina-plugins/rdp/rdp_plugin.c49
1 files changed, 3 insertions, 46 deletions
diff --git a/remmina-plugins/rdp/rdp_plugin.c b/remmina-plugins/rdp/rdp_plugin.c
index 928907912..0d39ee09e 100644
--- a/remmina-plugins/rdp/rdp_plugin.c
+++ b/remmina-plugins/rdp/rdp_plugin.c
@@ -122,40 +122,6 @@ static BOOL rf_process_event_queue(RemminaProtocolWidget* gp)
return True;
}
-static gboolean remmina_rdp_check_host_resolution(RemminaProtocolWidget *gp, char *hostname, int tcpport)
-{
- TRACE_CALL("remmina_rdp_check_host_resolution");
- struct addrinfo hints;
- struct addrinfo* result = NULL;
- int status;
- char service[16];
-
- if (hostname[0] == 0) {
- remmina_plugin_service->protocol_plugin_set_error(gp, _("The server name cannot be blank."));
- return FALSE;
- }
-
- memset(&hints, 0, sizeof(struct addrinfo));
- hints.ai_family = AF_UNSPEC;
- hints.ai_socktype = SOCK_STREAM;
- hints.ai_flags = 0;
- hints.ai_protocol = 0;
-
- sprintf(service, "%d", tcpport);
- status = getaddrinfo(hostname, service, &hints, &result);
- if (status != 0) {
- remmina_plugin_service->protocol_plugin_set_error(gp, _("Unable to find the address of RDP server %s."),
- hostname);
- if (result)
- freeaddrinfo(result);
- return FALSE;
- }
-
- freeaddrinfo(result);
- return TRUE;
-
-}
-
static gboolean remmina_rdp_tunnel_init(RemminaProtocolWidget* gp)
{
TRACE_CALL("remmina_rdp_tunnel_init");
@@ -194,18 +160,6 @@ static gboolean remmina_rdp_tunnel_init(RemminaProtocolWidget* gp)
remmina_plugin_service->get_server_port(cert_hostport, 3389, &cert_host, &cert_port);
}
- } else {
- /* When SSH tunnel is not enabled, we can verify that host
- * resolves correctly via DNS */
- if (!remmina_plugin_service->file_get_string(remminafile, "gateway_server")) {
- /* When SSH tunnel and gateway are disabled, we can verify that host
- * resolves correctly via DNS */
- if (!remmina_rdp_check_host_resolution(gp, host, port)) {
- g_free(host);
- g_free(hostport);
- return FALSE;
- }
- }
}
if (!rfi->is_reconnecting) {
@@ -1099,6 +1053,9 @@ static gboolean remmina_rdp_main(RemminaProtocolWidget* gp)
case FREERDP_ERROR_CONNECT_FAILED:
remmina_plugin_service->protocol_plugin_set_error(gp, _("Connection to RDP server %s failed."), rfi->settings->ServerHostname );
break;
+ case FREERDP_ERROR_DNS_NAME_NOT_FOUND:
+ remmina_plugin_service->protocol_plugin_set_error(gp, _("Unable to find the address of RDP server %s."), rfi->settings->ServerHostname );
+ break;
default:
remmina_plugin_service->protocol_plugin_set_error(gp, _("Unable to connect to RDP server %s"), rfi->settings->ServerHostname);
break;