[X2Go-Commits] [libx2goclient] 99/132: src/x2goclient-network-ssh.c: add general SSH client options before those in X2GoClientNetworkOptionsSSH.
git-admin at x2go.org
git-admin at x2go.org
Fri Dec 3 15:26:33 CET 2021
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository libx2goclient.
commit 0d158b862dbffc3e94d1bf9d36799d9c35b47cde
Author: Mihai Moldovan <ionic at ionic.de>
Date: Thu Sep 30 04:01:36 2021 +0200
src/x2goclient-network-ssh.c: add general SSH client options before those in X2GoClientNetworkOptionsSSH.
---
src/x2goclient-network-ssh.c | 42 +++++++++++++++++++++---------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c
index 24ebd26..aa0a0e1 100644
--- a/src/x2goclient-network-ssh.c
+++ b/src/x2goclient-network-ssh.c
@@ -1242,6 +1242,27 @@ static gboolean x2goclient_network_ssh_parent_connect (const gpointer ptr, GErro
}
if (ret) {
+ /* Add control path options. */
+ g_ptr_array_add (ssh_cmd, g_strdup ("-o"));
+ g_ptr_array_add (ssh_cmd, g_strdup ("ControlMaster=\"yes\""));
+ g_ptr_array_add (ssh_cmd, g_strdup ("-o"));
+ g_ptr_array_add (ssh_cmd, g_strdup ("ControlPersist=\"yes\""));
+ g_ptr_array_add (ssh_cmd, g_strdup ("-o"));
+ g_ptr_array_add (ssh_cmd, g_strdup_printf ("ControlPath=\"%s\"", self->control_path));
+
+ /* Force ssh process to background. */
+ g_ptr_array_add (ssh_cmd, g_strdup ("-f"));
+
+ /* Do not execute commands, we just want to have a master connection. */
+ g_ptr_array_add (ssh_cmd, g_strdup ("-N"));
+
+ /* We do not need a pseudo terminal. */
+ g_ptr_array_add (ssh_cmd, g_strdup ("-T"));
+
+ /* Let process terminate if it wasn't able to connect or set up sockets. */
+ g_ptr_array_add (ssh_cmd, g_strdup ("-o"));
+ g_ptr_array_add (ssh_cmd, g_strdup ("ExitOnForwardFailure=\"yes\""));
+
/* Fetch options object. */
X2GoClientNetworkOptionsSSH *options = NULL;
g_object_get (G_OBJECT (self), "options", &options, NULL);
@@ -1275,27 +1296,6 @@ static gboolean x2goclient_network_ssh_parent_connect (const gpointer ptr, GErro
}
}
- /* Add control path options. */
- g_ptr_array_add (ssh_cmd, g_strdup ("-o"));
- g_ptr_array_add (ssh_cmd, g_strdup ("ControlMaster=\"yes\""));
- g_ptr_array_add (ssh_cmd, g_strdup ("-o"));
- g_ptr_array_add (ssh_cmd, g_strdup ("ControlPersist=\"yes\""));
- g_ptr_array_add (ssh_cmd, g_strdup ("-o"));
- g_ptr_array_add (ssh_cmd, g_strdup_printf ("ControlPath=\"%s\"", self->control_path));
-
- /* Force ssh process to background. */
- g_ptr_array_add (ssh_cmd, g_strdup ("-f"));
-
- /* Do not execute commands, we just want to have a master connection. */
- g_ptr_array_add (ssh_cmd, g_strdup ("-N"));
-
- /* We do not need a pseudo terminal. */
- g_ptr_array_add (ssh_cmd, g_strdup ("-T"));
-
- /* Let process terminate if it wasn't able to connect or set up sockets. */
- g_ptr_array_add (ssh_cmd, g_strdup ("-o"));
- g_ptr_array_add (ssh_cmd, g_strdup ("ExitOnForwardFailure=\"yes\""));
-
/* Try to call uptime. */
g_ptr_array_add (ssh_cmd, g_strdup ("uptime"));
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
More information about the x2go-commits
mailing list