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:
authorAntenore Gatta <antenore@simbiosi.org>2021-01-15 14:40:32 +0300
committerAntenore Gatta <antenore@simbiosi.org>2021-01-15 15:33:41 +0300
commit23cab212bd8bab0532b0f964845ea8edc12216a3 (patch)
treeb6ae0533dba1bc9594ada794e2a93b871bf58707 /src/remmina_ssh_plugin.c
parentf304b319eca23f6bf0e5baaeb8b0cfcf8e75eab5 (diff)
Closing SSH connection when authentication fails
Diffstat (limited to 'src/remmina_ssh_plugin.c')
-rw-r--r--src/remmina_ssh_plugin.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/remmina_ssh_plugin.c b/src/remmina_ssh_plugin.c
index 325689b68..e73545a7d 100644
--- a/src/remmina_ssh_plugin.c
+++ b/src/remmina_ssh_plugin.c
@@ -314,6 +314,7 @@ remmina_plugin_ssh_main_thread(gpointer data)
if (!remmina_ssh_init_session(ssh)) {
REMMINA_DEBUG("init session error: %s", ssh->error);
remmina_plugin_service->protocol_plugin_set_error(gp, "%s", ssh->error);
+ // exit the loop here: OK
break;
}
}
@@ -331,6 +332,7 @@ remmina_plugin_ssh_main_thread(gpointer data)
case REMMINA_SSH_AUTH_PARTIAL:
REMMINA_DEBUG ("Continue with the next auth method");
partial = TRUE;
+ // Continue the loop: OK
continue;
break;
case REMMINA_SSH_AUTH_RECONNECT:
@@ -341,14 +343,19 @@ remmina_plugin_ssh_main_thread(gpointer data)
ssh->session = NULL;
}
g_free(ssh->callback);
+ // Continue the loop: OK
continue;
break;
case REMMINA_SSH_AUTH_USERCANCEL:
REMMINA_DEBUG ("Interrupted by the user");
+ // TODO: exit the loop here: OK
+ goto BREAK;
break;
default:
REMMINA_DEBUG ("Error during the authentication: %s", ssh->error);
remmina_plugin_service->protocol_plugin_set_error(gp, "%s", ssh->error);
+ // TODO: exit the loop here: OK
+ goto BREAK;
}
@@ -357,6 +364,8 @@ remmina_plugin_ssh_main_thread(gpointer data)
}
}
+BREAK:REMMINA_DEBUG("Authentication terminted with exit status %d", ret);
+
g_free(hostport);
if (!cont) {