This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository libx2goclient. from 5dbe21d src/x2goclient-network-ssh.{c,h}: start implementing connect () vfunc, create parent directory to control socket. new 8c761ed src/: add new stubs for miscellaneous utilities - x2goclient-utils.{c,h}. new 859925d src/Makefile.am: add x2goclient-utils.{c,h}. new 7d7b069 po/POTFILES.in: add x2goclient-utils.c. new 1b1745b src/x2goclient-utils.{c,h}: add helper for clearing string data. new 9a0df18 src/x2goclient.h: always include x2goclient-utils.h. Probably useful globally. new 397a4b1 src/x2goclient-network-ssh.c: memory cleanup in x2goclient_network_ssh_connect_parent (). new d8bd70f src/x2goclient-network.c: initialize private data. new f919a4b src/x2goclient-network-ssh.{c,h}: initial ssh command call construction. new 143bbbe src/x2goclient-network-ssh.c: fix (some) sockspec parsing truncation due to an off-by-one error when looking for the port separator colon or enclosing brackets. new c7cec96 src/x2goclient-network-ssh.c: set internal error when parsing an IPv4/IPv6 address failed. new 0497101 src/x2goclient-network-ssh.c: allow colons in alias/FQDN specs. The 11 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: po/POTFILES.in | 1 + src/Makefile.am | 2 + src/x2goclient-network-ssh.c | 131 +++++++++++++++++++++--- src/x2goclient-network-ssh.h | 6 +- src/x2goclient-network.c | 2 + src/{x2goclient-object.c => x2goclient-utils.c} | 12 +-- src/{x2goclient-object.h => x2goclient-utils.h} | 12 ++- src/x2goclient.h | 2 + 8 files changed, 142 insertions(+), 26 deletions(-) copy src/{x2goclient-object.c => x2goclient-utils.c} (85%) copy src/{x2goclient-object.h => x2goclient-utils.h} (82%) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 7d7b06947f29ec27e64c738d31e6c5c633f492ef Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 31 19:54:46 2019 +0200 po/POTFILES.in: add x2goclient-utils.c. --- po/POTFILES.in | 1 + 1 file changed, 1 insertion(+) diff --git a/po/POTFILES.in b/po/POTFILES.in index 07a75c9..bac2515 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -10,3 +10,4 @@ src/x2goclient-session-resume.c src/x2goclient-session-runcommand.c src/x2goclient-session-suspend.c src/x2goclient-session-terminate.c +src/x2goclient-utils.c -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 8c761ed59a7d27631875908608c5a61335ce8fcd Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 31 19:52:34 2019 +0200 src/: add new stubs for miscellaneous utilities - x2goclient-utils.{c,h}. --- src/x2goclient-utils.c | 29 +++++++++++++++++++++++++++++ src/x2goclient-utils.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/src/x2goclient-utils.c b/src/x2goclient-utils.c new file mode 100644 index 0000000..501e29b --- /dev/null +++ b/src/x2goclient-utils.c @@ -0,0 +1,29 @@ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* x2goclient-utils.c - Miscellaneous utilities for X2Go Client + + Copyright (C) 2019 Mike Gabriel + Copyright (C) 2019 Mihai Moldovan + All rights reserved. + + The libx2goclient library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The libx2goclient library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the Mate Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "x2goclient-utils.h" diff --git a/src/x2goclient-utils.h b/src/x2goclient-utils.h new file mode 100644 index 0000000..fb6efc3 --- /dev/null +++ b/src/x2goclient-utils.h @@ -0,0 +1,35 @@ +/* -*- Mode: C; c-set-style: linux indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ + +/* x2goclient-utils.h - Miscellaneous utilities for X2Go Client + + Copyright (C) 2019 Mike Gabriel + Copyright (C) 2019 Mihai Moldovan + All rights reserved. + + The libx2goclient library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The libx2goclient library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the Mate Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301, USA. + */ + +#ifndef x2goclient_utils_h +#define x2goclient_utils_h + +#include <gmodule.h> + +G_BEGIN_DECLS + + +G_END_DECLS + +#endif /* x2goclient_utils_h */ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 859925df296f9898f4fe15d980eaebbc7684f8c6 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 31 19:53:37 2019 +0200 src/Makefile.am: add x2goclient-utils.{c,h}. --- src/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index dbd76e3..907f824 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,6 +30,7 @@ libx2goclientinclude_HEADERS = \ x2goclient-session-runcommand.h \ x2goclient-session-suspend.h \ x2goclient-session-terminate.h \ + x2goclient-utils.h \ $(NULL) libx2goclient_la_SOURCES = \ @@ -44,6 +45,7 @@ libx2goclient_la_SOURCES = \ x2goclient-session-runcommand.c \ x2goclient-session-suspend.c \ x2goclient-session-terminate.c \ + x2goclient-utils.c \ $(NULL) libx2goclient_la_CFLAGS = \ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 397a4b1337ae5e7f8bc82f4a4be85dad53447144 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 31 20:11:02 2019 +0200 src/x2goclient-network-ssh.c: memory cleanup in x2goclient_network_ssh_connect_parent (). --- src/x2goclient-network-ssh.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c index b39357a..fa9612c 100644 --- a/src/x2goclient-network-ssh.c +++ b/src/x2goclient-network-ssh.c @@ -589,9 +589,22 @@ static gboolean x2goclient_network_ssh_parent_connect (X2GoClientNetwork *parent ret = FALSE; } + g_free (dirname); + dirname = NULL; + + GArray *ssh_cmd = g_array_new (TRUE, TRUE, sizeof (gchar*)); + g_array_set_clear_func (ssh_cmd, &x2goclient_clear_strings); + (void) g_array_append_vals (ssh_cmd, "ssh", 1); + if (ret) { ret = FALSE; } + g_free (session_path); + session_path = NULL; + + g_array_unref (ssh_cmd); + ssh_cmd = NULL; + return (ret); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 9a0df183e58312ce8bc23e34a56db01cf4d87c0a Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 31 19:59:08 2019 +0200 src/x2goclient.h: always include x2goclient-utils.h. Probably useful globally. --- src/x2goclient.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/x2goclient.h b/src/x2goclient.h index 7ea119b..604f63f 100644 --- a/src/x2goclient.h +++ b/src/x2goclient.h @@ -27,6 +27,8 @@ #include <glib.h> +#include "x2goclient-utils.h" + G_BEGIN_DECLS // #define X2GOCLIENT_GET_VERSION_S "get_version" -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 1b1745bd7160faf368c6b1812db5f0447ce8760f Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 31 19:57:25 2019 +0200 src/x2goclient-utils.{c,h}: add helper for clearing string data. --- src/x2goclient-utils.c | 4 ++++ src/x2goclient-utils.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/x2goclient-utils.c b/src/x2goclient-utils.c index 501e29b..ccdd82c 100644 --- a/src/x2goclient-utils.c +++ b/src/x2goclient-utils.c @@ -27,3 +27,7 @@ #endif #include "x2goclient-utils.h" + +void x2goclient_clear_strings (gpointer data) { + g_free (data); +} diff --git a/src/x2goclient-utils.h b/src/x2goclient-utils.h index fb6efc3..0959a32 100644 --- a/src/x2goclient-utils.h +++ b/src/x2goclient-utils.h @@ -29,6 +29,7 @@ G_BEGIN_DECLS +void x2goclient_clear_strings (gpointer data); G_END_DECLS -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit f919a4b85f4de20ead19cb2dd41087fd74f9666b Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 31 21:50:59 2019 +0200 src/x2goclient-network-ssh.{c,h}: initial ssh command call construction. Currently creates something like [ssh] [host] [[-p] [port]]. --- src/x2goclient-network-ssh.c | 99 +++++++++++++++++++++++++++++++++++++++++--- src/x2goclient-network-ssh.h | 6 ++- 2 files changed, 99 insertions(+), 6 deletions(-) diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c index fa9612c..94374c3 100644 --- a/src/x2goclient-network-ssh.c +++ b/src/x2goclient-network-ssh.c @@ -592,18 +592,107 @@ static gboolean x2goclient_network_ssh_parent_connect (X2GoClientNetwork *parent g_free (dirname); dirname = NULL; - GArray *ssh_cmd = g_array_new (TRUE, TRUE, sizeof (gchar*)); - g_array_set_clear_func (ssh_cmd, &x2goclient_clear_strings); - (void) g_array_append_vals (ssh_cmd, "ssh", 1); + GPtrArray *ssh_cmd = g_ptr_array_new_with_free_func (&x2goclient_clear_strings); + g_ptr_array_add (ssh_cmd, g_strdup ("ssh")); + + GSocketAddress *sock_addr = NULL; if (ret) { - ret = FALSE; + g_object_get (G_OBJECT (self), "socket", &sock_addr, NULL); + + if (!(sock_addr)) { + g_set_error_literal (gerr, X2GOCLIENT_NETWORK_SSH_ERROR, X2GOCLIENT_NETWORK_SSH_ERROR_CONNECT_SOCK_ADDR_NULL, "No end point to connect to."); + ret = FALSE; + } + } + + if (ret) { + if (G_IS_UNIX_SOCKET_ADDRESS (sock_addr)) { + GUnixSocketAddress *unix_sock_addr = G_UNIX_SOCKET_ADDRESS (sock_addr); + + /* + * Tiny problem here: abstract sockets won't work. + * Since program arguments can't contain NULL bytes due to being C + * strings and every abstract socket already has to start with a NULL + * byte, we'll be just adding an empty argument here. + * + * Maybe there will be a way to do that correctly, some day. + */ + g_ptr_array_add (ssh_cmd, g_strdup (g_unix_socket_address_get_path (unix_sock_addr))); + } + else if (G_IS_INET_SOCKET_ADDRESS (sock_addr)) { + GInetSocketAddress *inet_sock_addr = G_INET_SOCKET_ADDRESS (sock_addr); + GInetAddress *inet_addr = g_inet_socket_address_get_address (inet_sock_addr); + guint16 port = g_inet_socket_address_get_port (inet_sock_addr); + + if (!(inet_addr)) { + g_set_error_literal (gerr, X2GOCLIENT_NETWORK_SSH_ERROR, X2GOCLIENT_NETWORK_SSH_ERROR_CONNECT_INET_ADDR_NULL, "Internet socket address is undefined, cannot connect to an unknown remote IP host."); + ret = FALSE; + } + else { + g_ptr_array_add (ssh_cmd, g_inet_address_to_string (inet_addr)); + + /* + * Handle port parameter, unless it's 0, which means to use the default + * value. + */ + if (port) { + g_ptr_array_add (ssh_cmd, g_strdup ("-p")); + g_ptr_array_add (ssh_cmd, g_strdup_printf ("%d", port)); + } + } + } + else if (G_IS_NATIVE_SOCKET_ADDRESS (sock_addr)) { + GNativeSocketAddress *native_sock_addr = G_NATIVE_SOCKET_ADDRESS (sock_addr); + + g_assert (sizeof (struct sockaddr_ho) == g_socket_address_get_native_size (sock_addr)); + + struct sockaddr_ho tmp_sockaddr = { 0 }; + + /* Fetch data. */ + GError *tmp_err = NULL; + g_socket_address_to_native (sock_addr, &tmp_sockaddr, sizeof (struct sockaddr_ho), &tmp_err); + + if (tmp_err) { + g_set_error (gerr, X2GOCLIENT_NETWORK_SSH_ERROR, X2GOCLIENT_NETWORK_SSH_ERROR_CONNECT_NATIVE_FETCH, "Unable to convert native socket address object to sockaddr struct: %s", tmp_err->message); + g_clear_error (&tmp_err); + ret = FALSE; + } + + if (ret) { + g_ptr_array_add (ssh_cmd, g_strdup (tmp_sockaddr.sho_addr)); + + /* + * Handle port parameter, unless it's 0, which means to use the default + * value. + */ + if (tmp_sockaddr.sho_port) { + g_ptr_array_add (ssh_cmd, g_strdup ("-p")); + g_ptr_array_add (ssh_cmd, g_strdup_printf ("%d", tmp_sockaddr.sho_port)); + } + } + } + else { + g_set_error_literal (gerr, X2GOCLIENT_NETWORK_SSH_ERROR, X2GOCLIENT_NETWORK_SSH_ERROR_CONNECT_SOCK_ADDR_UNKNOWN, "Unknown data in socket property, can't connect."); + ret = FALSE; + } + + g_clear_object (&sock_addr); + sock_addr = NULL; + } + + if (ret) { + g_printf ("Would try to connect via:"); + for (gsize i = 0; i < ssh_cmd->len; ++i) { + g_printf (" [%s]", (gchar *)g_ptr_array_index (ssh_cmd, i)); + } + g_printf ("\n"); } g_free (session_path); session_path = NULL; - g_array_unref (ssh_cmd); + g_ptr_array_unref (ssh_cmd); ssh_cmd = NULL; return (ret); diff --git a/src/x2goclient-network-ssh.h b/src/x2goclient-network-ssh.h index 6c88c0e..dcb83f8 100644 --- a/src/x2goclient-network-ssh.h +++ b/src/x2goclient-network-ssh.h @@ -51,7 +51,11 @@ enum { X2GOCLIENT_NETWORK_SSH_ERROR_IPV6_CONV, X2GOCLIENT_NETWORK_SSH_ERROR_IPV4_CONV, X2GOCLIENT_NETWORK_SSH_ERROR_ALIAS_CONV, - X2GOCLIENT_NETWORK_SSH_ERROR_CONNECT_DIR_CREATE + X2GOCLIENT_NETWORK_SSH_ERROR_CONNECT_DIR_CREATE, + X2GOCLIENT_NETWORK_SSH_ERROR_CONNECT_SOCK_ADDR_NULL, + X2GOCLIENT_NETWORK_SSH_ERROR_CONNECT_INET_ADDR_NULL, + X2GOCLIENT_NETWORK_SSH_ERROR_CONNECT_NATIVE_FETCH, + X2GOCLIENT_NETWORK_SSH_ERROR_CONNECT_SOCK_ADDR_UNKNOWN, }; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit d8bd70f8c0cf4e2ff60751aa6b7c84f4d584a052 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 31 21:48:53 2019 +0200 src/x2goclient-network.c: initialize private data. --- src/x2goclient-network.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/x2goclient-network.c b/src/x2goclient-network.c index c97e3b4..801a0d4 100644 --- a/src/x2goclient-network.c +++ b/src/x2goclient-network.c @@ -121,6 +121,8 @@ static void x2goclient_network_class_init (X2GoClientNetworkClass *klass) { static void x2goclient_network_init (X2GoClientNetwork *self) { X2GoClientNetworkPrivate *priv = x2goclient_network_get_instance_private (self); + + priv->socket = priv->options = priv->session_path = NULL; } static void x2goclient_network_dispose (GObject *object) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 143bbbebbb9aa91b74cd1caceb35b46f3dc4a411 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 31 22:19:34 2019 +0200 src/x2goclient-network-ssh.c: fix (some) sockspec parsing truncation due to an off-by-one error when looking for the port separator colon or enclosing brackets. IPv6 spec parsing still fails, so more work required here. --- src/x2goclient-network-ssh.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c index 94374c3..87825f9 100644 --- a/src/x2goclient-network-ssh.c +++ b/src/x2goclient-network-ssh.c @@ -284,7 +284,6 @@ static GSocketAddress* x2goclient_network_ssh_parse_sockspec_ip (const GString * * See if that checks out. */ ++tmp_start; - --tmp_end; address = g_string_new_len (tmp_start, tmp_end - tmp_start); } @@ -306,8 +305,6 @@ static GSocketAddress* x2goclient_network_ssh_parse_sockspec_ip (const GString * tmp_end = g_strstr_len (tmp_start, -1, ":"); if (tmp_end) { - --tmp_end; - address = g_string_new_len (tmp_start, tmp_end - tmp_start); } else { @@ -333,7 +330,6 @@ static GSocketAddress* x2goclient_network_ssh_parse_sockspec_ip (const GString * GString *filter_work = NULL; if (filter_end) { - --filter_end; filter_work = g_string_new_len (filter_start, filter_end - filter_start); } else { @@ -359,19 +355,18 @@ static GSocketAddress* x2goclient_network_ssh_parse_sockspec_ip (const GString * /* * Specification in brackets, so check if there's a port specifier. * - * tmp_end points to the last part of the address, so tmp_end + 1 - * will point to the terminating bracket. tmp_end + 2 can, in the - * worst case, point to the terminating NULL character, which is + * tmp_end points to the terminating bracket. tmp_end + 1 can, in + * the worst case, point to the terminating NULL character, which is * fine. */ - portspec = g_string_new (tmp_end + 2); + portspec = g_string_new (tmp_end + 1); } else { /* * IPv4 addresses are not encapsulated in brackets, so the offset is * lower by one. */ - portspec = g_string_new (tmp_end + 1); + portspec = g_string_new (tmp_end); } GError *tmp_err = NULL; @@ -432,8 +427,6 @@ static GSocketAddress* x2goclient_network_ssh_parse_sockspec_alias (const GStrin tmp_end = g_strstr_len (tmp_start, -1, ":"); if (tmp_end) { - --tmp_end; - address = g_string_new_len (tmp_start, tmp_end - tmp_start); } else { @@ -455,10 +448,10 @@ static GSocketAddress* x2goclient_network_ssh_parse_sockspec_alias (const GStrin if (!(int_err)) { if (tmp_end) { /* - * No encapsulation whatsoever, so the colon must be at the next + * No encapsulation whatsoever, so the colon must be at the current * position. */ - GString *portspec = g_string_new (tmp_end + 1); + GString *portspec = g_string_new (tmp_end); GError *tmp_err = NULL; port = x2goclient_network_ssh_parse_sockspec_port (portspec, &tmp_err); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit c7cec9640021154b72c051efa5c66c0b81a11993 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 31 23:23:58 2019 +0200 src/x2goclient-network-ssh.c: set internal error when parsing an IPv4/IPv6 address failed. --- src/x2goclient-network-ssh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c index 87825f9..b7c1ee3 100644 --- a/src/x2goclient-network-ssh.c +++ b/src/x2goclient-network-ssh.c @@ -388,6 +388,9 @@ static GSocketAddress* x2goclient_network_ssh_parse_sockspec_ip (const GString * } } } + else { + int_err = TRUE; + } if (!(int_err)) { /* -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository libx2goclient. commit 04971015ffb923e38fe3fe5ff707551c3b06f236 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Aug 31 23:27:37 2019 +0200 src/x2goclient-network-ssh.c: allow colons in alias/FQDN specs. --- src/x2goclient-network-ssh.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/x2goclient-network-ssh.c b/src/x2goclient-network-ssh.c index b7c1ee3..41abff7 100644 --- a/src/x2goclient-network-ssh.c +++ b/src/x2goclient-network-ssh.c @@ -426,8 +426,11 @@ static GSocketAddress* x2goclient_network_ssh_parse_sockspec_alias (const GStrin /* * For FQDN or alias addresses (like for IPv4 addresses), we'll accept any * input of the form address:port. + * + * Note that we explicitly allow embedded colons, so only the last one will + * be regarded as the port separator. */ - tmp_end = g_strstr_len (tmp_start, -1, ":"); + tmp_end = g_strrstr_len (tmp_start, -1, ":"); if (tmp_end) { address = g_string_new_len (tmp_start, tmp_end - tmp_start); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/libx2goclient.git