This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch release/4.0.1.x in repository x2goserver. commit 0e4ed49669c8eaaf88b9692c76d5e081b0633a82 Author: Mihai Moldovan <ionic@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. --- 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 0459e32..3e04c5e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,13 @@ 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-admin@x2go.org> Wed, 08 Nov 2017 15:26:05 +0100 diff --git a/x2goserver/bin/x2goresume-session b/x2goserver/bin/x2goresume-session index c981a7d..c1fbab0 100755 --- a/x2goserver/bin/x2goresume-session +++ b/x2goserver/bin/x2goresume-session @@ -51,16 +51,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 8708799..40bc6c0 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