This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver.
commit 54d2c272f550c4f519578b8fccdda142a13499a9 Author: Mihai Moldovan <io...@ionic.de> Date: Fri Nov 10 20:32:28 2017 +0100 x2goserver/bin/x2go{resume-session,startagent}: use the actual system's host name instead of the short name only. Fixes startup issues on a wide variety of systems that use a FQDN as their host name. In such a scenario, using the short name works iff the short name maps to 127.0.0.1. Otherwise, session startups fail. Using the actual host name does not require such hacks, so use this instead. Cherry-picked from release/4.0.1.x branch. --- debian/changelog | 9 ++++++++- x2goserver/bin/x2goresume-session | 12 ++++-------- x2goserver/bin/x2gostartagent | 12 ++++-------- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/debian/changelog b/debian/changelog index 61dfa1b..69bc6e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -248,7 +248,14 @@ x2goserver (4.1.0.0-0x2go1.2) UNRELEASED; urgency=low x2goserver (4.0.1.22-0x2go1) UNRELEASED; urgency=medium - * Continue development + [ Mihai Moldovan ] + * New upstream version (4.0.1.22): + - x2goserver/bin/x2go{resume-session,startagent}: use the actual system's + host name instead of the short name only. Fixes startup issues on a wide + variety of systems that use a FQDN as their host name. In such a + scenario, using the short name works iff the short name maps to + 127.0.0.1. Otherwise, session startups fail. Using the actual host name + does not require such hacks, so use this instead. -- X2Go Release Manager <git-ad...@x2go.org> Wed, 08 Nov 2017 15:26:05 +0100 diff --git a/x2goserver/bin/x2goresume-session b/x2goserver/bin/x2goresume-session index 3ff8bdd..e959052 100755 --- a/x2goserver/bin/x2goresume-session +++ b/x2goserver/bin/x2goresume-session @@ -52,16 +52,12 @@ X2GO_FULLSCREEN=0 # - export HOSTNAME="malbox"; x2gostartagent will override the actual system # host name and lead to authorization failures when connecting to # x2goagent/nxagent later on. -# - even if the above is not the case, the value returned by gethostname(2) -# could either be a FQDN, the short name or anything in between. glibc -# seems to return the short name on Linux, since it calls uname(2), which -# typically does not include a domain, but *BSD seems to default to -# the FQDN. We explicitly need the short name. +# - even if the above is not the case, we want to be sure to get the actual +# system host name. # -# Workaround: use hostname -s, which luckily is portable enough to be available -# on a wide variety of systems. +# Workaround: use hostname. typeset current_host_name="" -current_host_name="$(hostname -s)" +current_host_name="$(hostname)" if [[ "${?}" -ne "0" ]]; then typeset msg="Unable to retrieve machine's hostname. This is required. Aborting session startup." diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent index e0a4a45..28b70d6 100755 --- a/x2goserver/bin/x2gostartagent +++ b/x2goserver/bin/x2gostartagent @@ -126,16 +126,12 @@ fi # - export HOSTNAME="malbox"; x2gostartagent will override the actual system # host name and lead to authorization failures when connecting to # x2goagent/nxagent later on. -# - even if the above is not the case, the value returned by gethostname(2) -# could either be a FQDN, the short name or anything in between. glibc -# seems to return the short name on Linux, since it calls uname(2), which -# typically does not include a domain, but *BSD seems to default to -# the FQDN. We explicitly need the short name. +# - even if the above is not the case, we want to be sure to get the actual +# system host name. # -# Workaround: use hostname -s, which luckily is portable enough to be available -# on a wide variety of systems. +# Workaround: use hostname. typeset current_host_name="" -current_host_name="$(hostname -s)" +current_host_name="$(hostname)" if [[ "${?}" -ne "0" ]]; then typeset msg="Unable to retrieve machine's hostname. This is required. Aborting session startup." -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git _______________________________________________ x2go-commits mailing list x2go-commits@lists.x2go.org https://lists.x2go.org/listinfo/x2go-commits