[X2Go-Commits] [libx2goclient] 18/19: src/x2goclient-network-ssh.c: add FIXMEs to x2goclient_network_ssh_fetch_openssh_version (), non-functional change.

git-admin at x2go.org git-admin at x2go.org
Fri May 29 11:34:05 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 e3f47907e6a88f29e743a25f613e5c55e8ec3d96
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Fri May 29 10:53:53 2020 +0200

    src/x2goclient-network-ssh.c: add FIXMEs to x2goclient_network_ssh_fetch_openssh_version (), non-functional change.
    
    I'd like to move that function to X2GoClientOpenSSHVersion, where it's
    probably placed a lot better and to revisit the stdout/stderr string
    sanitiazation part, which looks odd.
---
 src/x2goclient-network-ssh.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c
index e2e4cc8..b52c37e 100644
--- a/src/x2goclient-network-ssh.c
+++ b/src/x2goclient-network-ssh.c
@@ -967,6 +967,7 @@ static gboolean x2goclient_network_ssh_parent_connect (X2GoClientNetwork *parent
   return (ret);
 }
 
+/* FIXME: this code should probably be part of X2GoClientOpenSSHVersion. */
 static gboolean x2goclient_network_ssh_fetch_openssh_version (X2GoClientNetworkSSH *self, GError **gerr) {
   gboolean ret = FALSE;
 
@@ -1026,6 +1027,11 @@ static gboolean x2goclient_network_ssh_fetch_openssh_version (X2GoClientNetworkS
       int ssh_stdout_size_sanitized = 0, ssh_stderr_size_sanitized = 0;
       gchar *ssh_stdout_str_sanitized = 0, *ssh_stderr_str_sanitized = NULL;
 
+      /*
+       * FIXME: something about this section looks odd, revisit.
+       *        Also, we should probably drop everything but the first line
+       *        early on.
+       */
       /* Sanity check on output size. */
       if (INT_MAX < ssh_stdout_size) {
         g_log (NULL, G_LOG_LEVEL_WARNING, "OpenSSH returned more than %d bytes on stdout, this is unusual and will be truncated.", INT_MAX);

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