[arch-commits] Commit in tmate/trunk (3 files)

Christian Hesse eworm at archlinux.org
Tue Jul 30 14:16:24 UTC 2019


    Date: Tuesday, July 30, 2019 @ 14:16:23
  Author: eworm
Revision: 495320

upgpkg: tmate 2.2.1-4

fix remaining connectivity issues

Added:
  tmate/trunk/0001-libssh.patch
Modified:
  tmate/trunk/PKGBUILD
Deleted:
  tmate/trunk/0001-add-new-channel-after-authentication.patch

-------------------------------------------------+
 0001-add-new-channel-after-authentication.patch |   44 ---------
 0001-libssh.patch                               |  103 ++++++++++++++++++++++
 PKGBUILD                                        |    8 -
 3 files changed, 107 insertions(+), 48 deletions(-)

Deleted: 0001-add-new-channel-after-authentication.patch
===================================================================
--- 0001-add-new-channel-after-authentication.patch	2019-07-30 14:08:08 UTC (rev 495319)
+++ 0001-add-new-channel-after-authentication.patch	2019-07-30 14:16:23 UTC (rev 495320)
@@ -1,44 +0,0 @@
-From d95281d7f248ba5aa31a8977909a3344ec5b132c Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail at eworm.de>
-Date: Tue, 30 Jul 2019 08:15:59 +0200
-Subject: [PATCH 1/1] add new channel after authentication
-
-With libssh commit 8a885f0b ("channels: Add check if we are authenticated
-before we create a channel") connection fails if channel is added before
-successful authentication. So add the channel after authentication.
-
-Fixes #154
----
- tmate-ssh-client.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/tmate-ssh-client.c b/tmate-ssh-client.c
-index 96da14c8..2a9afee0 100644
---- a/tmate-ssh-client.c
-+++ b/tmate-ssh-client.c
-@@ -241,12 +241,6 @@ static void on_ssh_client_event(struct tmate_ssh_client *client)
- 
- 		ssh_set_callbacks(session, &client->ssh_callbacks);
- 
--		client->channel = channel = ssh_channel_new(session);
--		if (!channel) {
--			tmate_fatal("cannot initialize");
--			return;
--		}
--
- 		ssh_set_blocking(session, 0);
- 		ssh_options_set(session, SSH_OPTIONS_HOST, client->server_ip);
- 		ssh_options_set(session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
-@@ -370,6 +364,12 @@ static void on_ssh_client_event(struct tmate_ssh_client *client)
- 		case SSH_AUTH_SUCCESS:
- 			tmate_debug("Auth successful");
- 			client->state = SSH_OPEN_CHANNEL;
-+
-+			client->channel = channel = ssh_channel_new(session);
-+			if (!channel) {
-+				tmate_fatal("cannot initialize");
-+				return;
-+			}
- 			/* fall through */
- 		}
- 

Added: 0001-libssh.patch
===================================================================
--- 0001-libssh.patch	                        (rev 0)
+++ 0001-libssh.patch	2019-07-30 14:16:23 UTC (rev 495320)
@@ -0,0 +1,103 @@
+From 299c7c670c3d56ad6eaf73618dcf0c3c5d6fa2ec Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail at eworm.de>
+Date: Tue, 30 Jul 2019 08:15:59 +0200
+Subject: [PATCH 1/3] add new channel after authentication
+
+With libssh commit 8a885f0b ("channels: Add check if we are authenticated
+before we create a channel") connection fails if channel is added before
+successful authentication. So add the channel after authentication.
+
+Fixes #154
+---
+ tmate-ssh-client.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/tmate-ssh-client.c b/tmate-ssh-client.c
+index 96da14c8..2a9afee0 100644
+--- a/tmate-ssh-client.c
++++ b/tmate-ssh-client.c
+@@ -241,12 +241,6 @@ static void on_ssh_client_event(struct tmate_ssh_client *client)
+ 
+ 		ssh_set_callbacks(session, &client->ssh_callbacks);
+ 
+-		client->channel = channel = ssh_channel_new(session);
+-		if (!channel) {
+-			tmate_fatal("cannot initialize");
+-			return;
+-		}
+-
+ 		ssh_set_blocking(session, 0);
+ 		ssh_options_set(session, SSH_OPTIONS_HOST, client->server_ip);
+ 		ssh_options_set(session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
+@@ -370,6 +364,12 @@ static void on_ssh_client_event(struct tmate_ssh_client *client)
+ 		case SSH_AUTH_SUCCESS:
+ 			tmate_debug("Auth successful");
+ 			client->state = SSH_OPEN_CHANNEL;
++
++			client->channel = channel = ssh_channel_new(session);
++			if (!channel) {
++				tmate_fatal("cannot initialize");
++				return;
++			}
+ 			/* fall through */
+ 		}
+ 
+From e25ab3cc8bb4d42b137625b376d677707bc4fbe2 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn at cryptomilk.org>
+Date: Tue, 30 Jul 2019 14:48:37 +0200
+Subject: [PATCH 2/3] ssh-client: Add missing ecdsa keytypes of libssh 0.9
+---
+ tmate-ssh-client.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/tmate-ssh-client.c b/tmate-ssh-client.c
+index 2a9afee0..943ebf49 100644
+--- a/tmate-ssh-client.c
++++ b/tmate-ssh-client.c
+@@ -218,7 +218,7 @@ static void on_ssh_client_event(struct tmate_ssh_client *client)
+ {
+ 	char *identity;
+ 	ssh_key pubkey;
+-	int key_type;
++	enum ssh_keytypes_e key_type;
+ 	unsigned char *hash;
+ 	ssize_t hash_len;
+ 	char *hash_str;
+@@ -304,6 +304,11 @@ static void on_ssh_client_event(struct tmate_ssh_client *client)
+ 						"tmate-server-rsa-fingerprint");
+ 			break;
+ 		case SSH_KEYTYPE_ECDSA:
++#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 9, 0)
++		case SSH_KEYTYPE_ECDSA_P256:
++		case SSH_KEYTYPE_ECDSA_P384:
++		case SSH_KEYTYPE_ECDSA_P521:
++#endif
+ 			server_hash_str = options_get_string(global_options,
+ 						"tmate-server-ecdsa-fingerprint");
+ 			break;
+From 4e7caeb536629fc4ddc4d413ca867f754b1257c3 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <asn at cryptomilk.org>
+Date: Tue, 30 Jul 2019 15:37:35 +0200
+Subject: [PATCH 3/3] ssh-client: Use ssh_get_server_publickey() if possible
+---
+ tmate-ssh-client.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/tmate-ssh-client.c b/tmate-ssh-client.c
+index 943ebf49..c5fb4243 100644
+--- a/tmate-ssh-client.c
++++ b/tmate-ssh-client.c
+@@ -282,8 +282,13 @@ static void on_ssh_client_event(struct tmate_ssh_client *client)
+ 		}
+ 
+ 	case SSH_AUTH_SERVER:
++#if LIBSSH_VERSION_INT >= SSH_VERSION_INT(0, 9, 0)
++		if (ssh_get_server_publickey(session, &pubkey) < 0)
++			tmate_fatal("ssh_get_server_publickey");
++#else
+ 		if (ssh_get_publickey(session, &pubkey) < 0)
+ 			tmate_fatal("ssh_get_publickey");
++#endif
+ 
+ 		if (ssh_get_publickey_hash(pubkey, SSH_PUBLICKEY_HASH_SHA256,
+ 					   &hash, &hash_len) < 0) {

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-07-30 14:08:08 UTC (rev 495319)
+++ PKGBUILD	2019-07-30 14:16:23 UTC (rev 495320)
@@ -4,7 +4,7 @@
 
 pkgname=tmate
 pkgver=2.2.1
-pkgrel=3
+pkgrel=4
 pkgdesc='Instant terminal sharing'
 arch=('x86_64')
 url='http://tmate.io/'
@@ -12,14 +12,14 @@
 depends=('libevent' 'libssh' 'libutempter' 'msgpack-c')
 makedepends=('cmake' 'ruby')
 source=("https://github.com/tmate-io/${pkgname}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
-        '0001-add-new-channel-after-authentication.patch')
+        '0001-libssh.patch')
 sha256sums=('d9c2ac59f42e65aac5f500f0548ea8056fd79c9c5285e5af324d833e2a84c305'
-            '85029b3b32f6306fe44fb4a7c0a7307007436a69c4e5c2c00bfabec4db9f117c')
+            'f8399462312eec47b4dca34d14fc2550173556438d81fbb936896d5114008a06')
 
 prepare() {
   cd ${srcdir}/${pkgname}-${pkgver}
 
-  patch -Np1 < ../0001-add-new-channel-after-authentication.patch
+  patch -Np1 < ../0001-libssh.patch
 }
 
 build() {



More information about the arch-commits mailing list