[X2Go-Commits] [libx2goclient] 01/19: src/x2goclient-network-ssh.c: hook up OpenSSH version number fetching to x2goclient_network_ssh_parent_connect ().

git-admin at x2go.org git-admin at x2go.org
Fri May 29 11:34:03 CEST 2020


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository libx2goclient.

commit aa1841ce7046ac539bff837e8162fa9f10dbb4e0
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed May 27 08:46:07 2020 +0200

    src/x2goclient-network-ssh.c: hook up OpenSSH version number fetching to x2goclient_network_ssh_parent_connect ().
    
    We want to fetch the version as locally to spawning OpenSSH client
    processes as possible, mostly because users COULD upgrade their client
    version while the application that is using libx2goclient is running.
    
    These new instances might need different bug quirks.
    
    Strictly speaking, this should probably be thread-local storage for each
    new thread spawning an OpenSSH client process, but this would require
    additional work (including the actual threading).
---
 src/x2goclient-network-ssh.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c
index 0029d2c..dfa9d4e 100644
--- a/src/x2goclient-network-ssh.c
+++ b/src/x2goclient-network-ssh.c
@@ -817,6 +817,24 @@ static gboolean x2goclient_network_ssh_parent_connect (X2GoClientNetwork *parent
   }
 
   if (ret) {
+    /*
+     * Fetch version.
+     *
+     * We need to do this as locally as possible, preferably for every new
+     * connection (or, really, each time we spawn OpenSSH client processes),
+     * including the master connection here.
+     *
+     * The rationale is that users could potentially upgrade the OpenSSH client
+     * while the application is running and we don't want quirks to apply to updated,
+     * non-quirky versions, even though previous calls needed them.
+     */
+    ret = x2goclient_network_ssh_fetch_openssh_version (self, gerr);
+  }
+
+  if (ret) {
+    /* Got version. */
+    g_log (NULL, G_LOG_LEVEL_INFO, "Fetched OpenSSH version: [ Major: %d, Minor: %d, Patch: %d, Additional Data: '%s' ]", self->openssh_version->major, self->openssh_version->minor, self->openssh_version->patch, self->openssh_version->addon);
+
     /* Fetch options object. */
     X2GoClientNetworkOptionsSSH *options = NULL;
     g_object_get (G_OBJECT (self), "options", &options, NULL);

--
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