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 (tmow) <antenore@simbiosi.org>2022-04-08 08:40:46 +0300
committerAntenore Gatta (tmow) <antenore@simbiosi.org>2022-04-08 08:40:46 +0300
commit003aa612b96d8f7e0378b839804a3fff6467f06c (patch)
treeef6d14854418a92633fc4d78e84fb73bb4bda2bf
parentb15675ded5e6683cba96f1d6622020c9b606f0ec (diff)
Aligned wit branch issue/2713-ssh-x11-forward
-rw-r--r--CMakeLists.txt4
-rw-r--r--flatpak/org.remmina.Remmina-local.json17
-rw-r--r--src/remmina_ssh.c12
-rw-r--r--src/remmina_ssh_plugin.c64
4 files changed, 53 insertions, 44 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ee844f6c4..ec06950da 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -452,6 +452,10 @@ if(CMAKE_COMPILER_IS_GNUCC AND WITH_GCC_SANITIZE_ADDRESS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
endif()
+if(CMAKE_COMPILER_IS_GNUCC AND WITH_GCC_SANITIZE_THREAD)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread")
+endif()
+
# LLVM coverage flags - https://clang.llvm.org/docs/SourceBasedCodeCoverage.html
if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang" AND WITH_CLANG_COVERAGE)
message(STATUS "Enabling coverage.")
diff --git a/flatpak/org.remmina.Remmina-local.json b/flatpak/org.remmina.Remmina-local.json
index 11395b0ca..ca1b78491 100644
--- a/flatpak/org.remmina.Remmina-local.json
+++ b/flatpak/org.remmina.Remmina-local.json
@@ -133,8 +133,8 @@
{
"type": "git",
"url": "https://gitlab.gnome.org/GNOME/vte.git",
- "tag": "0.68.0",
- "commit": "0f438924f9f8a858b1b82434c876e31c2de180d4",
+ "tag": "0.67.90",
+ "commit": "08f6c596d1a05e20541b8268d19aede55ac99f4d",
"x-checker-data": {
"type": "git",
"tag-pattern": "^([\\d.]+)$"
@@ -381,7 +381,7 @@
"type": "git",
"url": "https://github.com/jedisct1/libsodium.git",
"branch": "stable",
- "commit": "7389bf7f2968be75520e932704f18f038c29e581"
+ "commit": "32cba2b5e90c2b98b61e8cc4c8105c0a27725fb0"
}
],
"post-install": [
@@ -456,17 +456,14 @@
"-DWITH_OSS:BOOL=OFF",
"-DWITH_PULSE:BOOL=ON",
"-DWITH_CHANNELS:BOOL=ON",
- "-DWITH_LIBSYSTEMD:BOOL=OFF",
- "-DWITH_DEBUG_NEGO=ON",
- "-DWITH_DEBUG_NLA=ON",
- "-DWITH_DEBUG_NTLM=ON"
+ "-DWITH_LIBSYSTEMD:BOOL=OFF"
],
"sources": [
{
"type": "git",
"url": "https://github.com/FreeRDP/FreeRDP.git",
- "tag": "2.6.1",
- "commit": "658a72980f6e93241d927c46cfa664bf2547b8b1",
+ "tag": "2.6.0",
+ "commit": "8a5c034d547c428c512b0a4b840d3a8a4762f989",
"x-checker-data": {
"type": "git",
"tag-pattern": "^([\\d.]+)$"
@@ -495,7 +492,7 @@
"sources": [
{
"type": "dir",
- "path": "../"
+ "path": "~/remmina_devel/Remmina"
}
]
}
diff --git a/src/remmina_ssh.c b/src/remmina_ssh.c
index 2e214650d..e06f21da6 100644
--- a/src/remmina_ssh.c
+++ b/src/remmina_ssh.c
@@ -106,7 +106,6 @@
#endif
-
/*-----------------------------------------------------------------------------*
* SSH Base *
*-----------------------------------------------------------------------------*/
@@ -2011,6 +2010,7 @@ remmina_ssh_free(RemminaSSH *ssh)
{
TRACE_CALL(__func__);
if (ssh->session) {
+ REMMINA_DEBUG("Disconnecting SSH session");
ssh_disconnect(ssh->session);
ssh_free(ssh->session);
ssh->session = NULL;
@@ -3045,12 +3045,14 @@ void
remmina_ssh_shell_free(RemminaSSHShell *shell)
{
TRACE_CALL(__func__);
- pthread_t thread = shell->thread;
+ //pthread_t thread = shell->thread;
shell->exit_callback = NULL;
- if (thread) {
- shell->closed = TRUE;
- pthread_join(thread, NULL);
+ shell->closed = TRUE;
+ REMMINA_DEBUG("Cancelling the shell thread if needed");
+ if (shell->thread) {
+ pthread_cancel(shell->thread);
+ if (shell->thread) pthread_join(shell->thread, NULL);
}
close(shell->slave);
if (shell->exec) {
diff --git a/src/remmina_ssh_plugin.c b/src/remmina_ssh_plugin.c
index 13f3d7d99..b96a5389e 100644
--- a/src/remmina_ssh_plugin.c
+++ b/src/remmina_ssh_plugin.c
@@ -395,7 +395,7 @@ BREAK:
remmina_plugin_ssh_vte_terminal_set_encoding_and_pty(VTE_TERMINAL(gpdata->vte), charset, shell->master, shell->slave);
/* TODO: The following call should be moved on the main thread, or something weird could happen */
- remmina_plugin_ssh_on_size_allocate(GTK_WIDGET(gpdata->vte), NULL, gp);
+ //remmina_plugin_ssh_on_size_allocate(GTK_WIDGET(gpdata->vte), NULL, gp);
remmina_plugin_service->protocol_plugin_signal_connection_opened(gp);
@@ -871,32 +871,6 @@ void remmina_plugin_ssh_popup_ui(RemminaProtocolWidget *gp)
gtk_widget_show_all(menu);
}
-static gboolean
-remmina_plugin_ssh_close_connection(RemminaProtocolWidget *gp)
-{
- TRACE_CALL(__func__);
- RemminaPluginSshData *gpdata = GET_PLUGIN_DATA(gp);
-
- RemminaFile *remminafile;
-
- REMMINA_DEBUG("Requesting to close the connection");
- remminafile = remmina_plugin_service->protocol_plugin_get_file(gp);
-
- if (remmina_file_get_int(remminafile, "sshlogenabled", FALSE))
- remmina_plugin_ssh_vte_save_session(NULL, gp);
- if (gpdata->thread) {
- pthread_cancel(gpdata->thread);
- if (gpdata->thread) pthread_join(gpdata->thread, NULL);
- }
- if (gpdata->shell) {
- remmina_ssh_shell_free(gpdata->shell);
- gpdata->shell = NULL;
- }
-
- remmina_plugin_service->protocol_plugin_signal_connection_closed(gp);
- return FALSE;
-}
-
static void
remmina_plugin_ssh_eof(VteTerminal *vteterminal, RemminaProtocolWidget *gp)
{
@@ -923,6 +897,34 @@ remmina_plugin_ssh_eof(VteTerminal *vteterminal, RemminaProtocolWidget *gp)
gpdata->closed = TRUE;
}
+static gboolean
+remmina_plugin_ssh_close_connection(RemminaProtocolWidget *gp)
+{
+ TRACE_CALL(__func__);
+ RemminaPluginSshData *gpdata = GET_PLUGIN_DATA(gp);
+
+ RemminaFile *remminafile;
+
+ REMMINA_DEBUG("Requesting to close the connection");
+ remminafile = remmina_plugin_service->protocol_plugin_get_file(gp);
+
+ if (remmina_file_get_int(remminafile, "sshlogenabled", FALSE))
+ remmina_plugin_ssh_vte_save_session(NULL, gp);
+ remmina_plugin_ssh_eof(VTE_TERMINAL(gpdata->vte), gp);
+
+ if (gpdata->thread) {
+ pthread_cancel(gpdata->thread);
+ if (gpdata->thread) pthread_join(gpdata->thread, NULL);
+ }
+ if (gpdata->shell) {
+ remmina_ssh_shell_free(gpdata->shell);
+ gpdata->shell = NULL;
+ }
+
+ remmina_plugin_service->protocol_plugin_signal_connection_closed(gp);
+ return FALSE;
+}
+
/**
* Remmina SSH plugin initialization.
*
@@ -1540,12 +1542,12 @@ static const RemminaProtocolSetting remmina_ssh_advanced_settings[] =
{ REMMINA_PROTOCOL_SETTING_TYPE_FOLDER, "sshlogfolder", N_("Folder for SSH session log"), FALSE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_TEXT, "sshlogname", N_("Filename for SSH session log"), FALSE, NULL, log_tips },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "sshlogenabled", N_("Log SSH session when exiting Remmina"), FALSE, NULL, NULL },
- { REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "sshsavesession", N_("Log SSH session asynchronously"), FALSE, NULL, N_("Saving the session asynchronously may have a notable performance impact") },
+ { REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "sshsavesession", N_("Log SSH session asynchronously"), TRUE, NULL, N_("Saving the session asynchronously may have a notable performance impact") },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "audiblebell", N_("Audible terminal bell"), FALSE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "ssh_forward_x11", N_("SSH ForwardX11"), TRUE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "ssh_compression", N_("SSH compression"), FALSE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "disablepasswordstoring", N_("Don't remember passwords"), TRUE, NULL, NULL },
- { REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "ssh_stricthostkeycheck", N_("Strict host key checking"), TRUE, NULL, NULL },
+ { REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "ssh_stricthostkeycheck", N_("Strict host key checking"), FALSE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_END, NULL, NULL, FALSE, NULL, NULL }
};
@@ -1703,7 +1705,11 @@ remmina_ssh_plugin_register(void)
RemminaProtocolSettingOpt *settings;
// preset new settings with (old) static remmina_ssh_advanced_settings data
+#if GLIB_CHECK_VERSION(2,68,0)
+ settings = g_memdup2(remmina_ssh_advanced_settings, sizeof(remmina_ssh_advanced_settings));
+#else
settings = g_memdup(remmina_ssh_advanced_settings, sizeof(remmina_ssh_advanced_settings));
+#endif
// create dynamic advanced settings to made replacing of ssh_terminal_palette possible
gpointer ssh_terminal_palette_new = NULL;