[X2Go-Commits] [x2gothinclient] 02/03: Provide empty/dummy FreeRDPv2 known_hosts2 file if not already there.

git-admin at x2go.org git-admin at x2go.org
Sun Jul 21 14:39:10 CEST 2019


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

x2go pushed a commit to branch master
in repository x2gothinclient.

commit bb4ab6a55070e6f44181b3f42d7a2f9d5e4faea0
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Jul 21 14:36:52 2019 +0200

    Provide empty/dummy FreeRDPv2 known_hosts2 file if not already there.
---
 common/etc/freerdp/known_hosts        | 2 +-
 common/etc/freerdp/known_hosts2       | 1 +
 debian/changelog                      | 2 ++
 management/sbin/x2gothinclient_create | 9 ++++++++-
 4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/common/etc/freerdp/known_hosts b/common/etc/freerdp/known_hosts
index 3367656..3040fbb 100644
--- a/common/etc/freerdp/known_hosts
+++ b/common/etc/freerdp/known_hosts
@@ -1 +1 @@
-# put FreeRDP's known host into this file...
\ No newline at end of file
+# put FreeRDP's known host into this file... (this is for FreeRDP 1.1.x)
\ No newline at end of file
diff --git a/common/etc/freerdp/known_hosts2 b/common/etc/freerdp/known_hosts2
new file mode 100644
index 0000000..72c16fd
--- /dev/null
+++ b/common/etc/freerdp/known_hosts2
@@ -0,0 +1 @@
+# put FreeRDP's known host into this file... (this is for FreeRDP 2.x)
\ No newline at end of file
diff --git a/debian/changelog b/debian/changelog
index ee0f6f1..3f0633c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,8 @@ x2gothinclient (1.5.0.1-0x2go1) UNRELEASED; urgency=medium
       specific theming of the desktop UI. (Closes: #1364).
     - Install minidesktop's background SVG to DATADIR and symlink to it in
       ETCDIR.
+    - Provide empty/dummy FreeRDPv2 known_hosts2 file if not
+      already there.
   * debian/rules:
     + Convert to pure debhelper rules file.
 
diff --git a/management/sbin/x2gothinclient_create b/management/sbin/x2gothinclient_create
index c044a11..2324fbc 100755
--- a/management/sbin/x2gothinclient_create
+++ b/management/sbin/x2gothinclient_create
@@ -107,7 +107,14 @@ ls "$SHAREDIR/etc/x2gothinclient_init.d" | while read init_part; do
 done
 
 mkdir -p "$TC_CONFIG/freerdp"
-test -f "$TC_CONFIG/freerdp/known_hosts" || echo "# X2Go TCE: validate allowed RDP servers with their fingerprints through this file" > "$TC_CONFIG/freerdp/known_hosts"
+if [ "x$TC_DISTRO_CODENAME" = "xstretch" ] || [ "x$TC_DISTRO_CODENAME" = "xjessie" ]; then
+	# this is for FreeRDP v1.1.x (as found in Debian jessie and stretch)
+	test -f "$TC_CONFIG/freerdp/known_hosts" || echo "# X2Go TCE: validate allowed RDP servers with their fingerprints through this file" > "$TC_CONFIG/freerdp/known_hosts"
+else
+	# this is for FreeRDP v2.x (as found in buster and beyond), let's presume that this
+	# "else" clause means: all distro versions more recent than stretch or jessie
+	test -f "$TC_CONFIG/freerdp/known_hosts2" || echo "# X2Go TCE: validate allowed RDP servers with their fingerprints through this file" > "$TC_CONFIG/freerdp/known_hosts2"
+fi
 
 apt-get install debootstrap
 mkdir -p "$TC_CHROOT"

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gothinclient.git


More information about the x2go-commits mailing list