This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goserver. from 3312cf3 Nooo... we need to break/replace x2goagent (<< 2:3.5.99.2~). new 096c9ea x2goserver/bin/x2gostartagent: fetch hostname via "hostname -s" and do not rely on the HOSTNAME variable. new c2c5ab6 x2goserver/x2gosqlitewrapper.c: fix implicit declaration of execv(). new 89ae4d3 x2goserver/bin/x2golistshadowsessions: whitespace only. new 790b996 x2goserver/sbin/x2gocleansessions: close syslog at program exit. new a93efd2 x2goserver/sbin/x2gocleansessions: whitespace only. new ba57134 debian/changelog: merge in changes from current release branch. The 6 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: debian/changelog | 13 ++++++ .../src/libx2go-server-db-sqlite3-wrapper.c | 2 + x2goserver/bin/x2golistshadowsessions | 4 +- x2goserver/bin/x2gostartagent | 48 ++++++++++++++++------ x2goserver/sbin/x2gocleansessions | 9 ++-- 5 files changed, 58 insertions(+), 18 deletions(-) -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit 096c9ea3e8c45d267561dd5304a943536dc46639 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Oct 11 06:56:07 2017 +0200 x2goserver/bin/x2gostartagent: fetch hostname via "hostname -s" and do not rely on the HOSTNAME variable. The latter is only set automatically by bash if it's not already part of the environment. We might get "garbage" in this way (and one user actually did.) Cherry-picked from release/4.0.1.x branch. --- debian/changelog | 4 ++++ x2goserver/bin/x2gostartagent | 48 ++++++++++++++++++++++++++++++++----------- 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index de78071..b8444a9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -269,6 +269,10 @@ x2goserver (4.0.1.21-0x2go1) UNRELEASED; urgency=medium loginctl utility before calling x2goagent. Fixes: #1198. - x2goserver-xsession/etc/Xsession: support Devuan just like Debian, give useful error message in case the OS is unknown. + - x2goserver/bin/x2gostartagent: fetch hostname via "hostname -s" and do + not rely on the HOSTNAME variable. The latter is only set automatically + by bash if it's not already part of the environment. We might get + "garbage" in this way (and one user actually did.) * x2goserver.spec: - Add mandatory perl-generators Build-Requires as per https://fedoraproject.org/wiki/Changes/Build_Root_Without_Perl diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent index 63112af..f005cd8 100755 --- a/x2goserver/bin/x2gostartagent +++ b/x2goserver/bin/x2gostartagent @@ -119,6 +119,31 @@ elif ! echo $HOME | iconv -f ASCII -t ASCII 1>/dev/null 2>/dev/null; then exit -5 fi +# ${HOSTNAME} should be automatically set by bash via gethostname(2), IFF this +# variable is not already set in the environment. +# +# This leads to two problems: +# - 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. +# +# Workaround: use hostname -s, which luckily is portable enough to be available +# on a wide variety of systems. +typeset current_host_name="" +current_host_name="$(hostname -s)" + +if [[ "${?}" -ne "0" ]]; then + typeset msg="Unable to retrieve machine's hostname. This is required. Aborting session startup." + echo "${msg}" + "${X2GO_LIB_PATH}/x2gosyslog" "${0}" "err" "${msg}" + exit 1 +fi + X2GO_TELEKINESIS_ENABLED=`echo 'use X2Go::Config qw( get_config ); use X2Go::Utils qw( is_true ); my $Config = get_config(); print is_true($Config->param("telekinesis.enable"));' | perl` X2GO_ROOT="${HOME}/.x2go" @@ -206,8 +231,8 @@ if [ "$X2GO_STYPE" == "S" ]; then X2GO_PORT=`echo $OUTPUT | awk '{print $1}'` $X2GO_LIB_PATH/x2gosyslog "$0" "debug" "received shadow session information: cookie: $X2GO_COOKIE, port: $X2GO_PORT" - xauth -f "$XAUTHORITY" add "${HOSTNAME}/unix:${X2GO_PORT}" MIT-MAGIC-COOKIE-1 "${X2GO_COOKIE}" - xauth -f "$XAUTHORITY" add "${HOSTNAME}:${X2GO_PORT}" MIT-MAGIC-COOKIE-1 "${X2GO_COOKIE}" + xauth -f "$XAUTHORITY" add "${current_host_name}/unix:${X2GO_PORT}" MIT-MAGIC-COOKIE-1 "${X2GO_COOKIE}" + xauth -f "$XAUTHORITY" add "${current_host_name}:${X2GO_PORT}" MIT-MAGIC-COOKIE-1 "${X2GO_COOKIE}" echo $X2GO_PORT echo $X2GO_COOKIE @@ -248,7 +273,7 @@ elif [ "$X2GO_STYPE" == "S" ]; then fi if [ "$X2GO_CLIENT" == "" ]; then - X2GO_CLIENT="$HOSTNAME" + X2GO_CLIENT="${current_host_name}" fi # define the full path to the ss utility @@ -257,11 +282,11 @@ ss=$(PATH="$PATH:/usr/sbin:/sbin" type -P ss); while [ "$OUTPUT" != "inserted" ]; do typeset -a used_displays - IFS='' read -ar used_displays < <("${X2GO_LIB_PATH}/x2gogetdisplays" "${HOSTNAME}") + IFS='' read -ar used_displays < <("${X2GO_LIB_PATH}/x2gogetdisplays" "${current_host_name}") #Get all used in system ports from X2Go database and ss output USED_PORTS=$( - "$X2GO_LIB_PATH/x2gogetports" "$HOSTNAME"; + "$X2GO_LIB_PATH/x2gogetports" "${current_host_name}"; "$ss" -nt -all | awk '{ n=split($0,lines,"\n"); for(i=1;i<=n;i++){split (lines[i],words," ");delim=split(words[4],ports,":"); if(delim>1)printf ("|%s|\n",ports[delim])} }'; ); @@ -315,10 +340,10 @@ while [ "$OUTPUT" != "inserted" ]; do if [ -n "$SHADREQ_USER" ]; then $X2GO_LIB_PATH/x2gosyslog "$0" "debug" "initializing new shadow session with ID $SESSION_NAME" - OUTPUT=`$X2GO_LIB_PATH/x2goinsertshadowsession "$X2GO_PORT" "$HOSTNAME" "$SESSION_NAME" "$SHADREQ_USER"` + OUTPUT=`$X2GO_LIB_PATH/x2goinsertshadowsession "$X2GO_PORT" "${current_host_name}" "$SESSION_NAME" "$SHADREQ_USER"` else $X2GO_LIB_PATH/x2gosyslog "$0" "debug" "initializing new session with ID $SESSION_NAME" - OUTPUT=`$X2GO_LIB_PATH/x2goinsertsession "$X2GO_PORT" "$HOSTNAME" "$SESSION_NAME"` + OUTPUT=`$X2GO_LIB_PATH/x2goinsertsession "$X2GO_PORT" "${current_host_name}" "$SESSION_NAME"` fi fi done @@ -336,7 +361,7 @@ while [ "$GR_PORT" == "" ] || [ "$SOUND_PORT" == "" ] || [ "$FS_PORT" == "" ] || #Get all used in system ports from X2Go database and ss output USED_PORTS=$( - "$X2GO_LIB_PATH/x2gogetports" "$HOSTNAME"; + "$X2GO_LIB_PATH/x2gogetports" "${current_host_name}"; "$ss" -nt -all | awk '{ n=split($0,lines,"\n"); for(i=1;i<=n;i++){split (lines[i],words," ");delim=split(words[4],ports,":"); if(delim>1)printf ("|%s|\n",ports[delim])} }'; ); @@ -347,7 +372,7 @@ while [ "$GR_PORT" == "" ] || [ "$SOUND_PORT" == "" ] || [ "$FS_PORT" == "" ] || #check if port in /etc/services SERV=`grep $SSH_PORT /etc/services` if [ "$SERV" == "" ]; then - OUTPUT=`$X2GO_LIB_PATH/x2goinsertport "$HOSTNAME" "$SESSION_NAME" "$SSH_PORT"` + OUTPUT=`$X2GO_LIB_PATH/x2goinsertport "${current_host_name}" "$SESSION_NAME" "$SSH_PORT"` fi done @@ -424,13 +449,12 @@ grep PPid /proc/$PPID/status > ${SESSION_DIR}/sshd.pid X2GO_COOKIE=`mcookie` - PATH="${PATH}:${X2GO_BIN}/" export PATH -xauth -f "$XAUTHORITY" add "${HOSTNAME}/unix:${X2GO_PORT}" MIT-MAGIC-COOKIE-1 "${X2GO_COOKIE}" -xauth -f "$XAUTHORITY" add "${HOSTNAME}:${X2GO_PORT}" MIT-MAGIC-COOKIE-1 "${X2GO_COOKIE}" +xauth -f "$XAUTHORITY" add "${current_host_name}/unix:${X2GO_PORT}" MIT-MAGIC-COOKIE-1 "${X2GO_COOKIE}" +xauth -f "$XAUTHORITY" add "${current_host_name}:${X2GO_PORT}" MIT-MAGIC-COOKIE-1 "${X2GO_COOKIE}" option_geometry="" -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit c2c5ab6b4c0c224f8cecc811df13e3853e590fdf Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Oct 11 07:04:32 2017 +0200 x2goserver/x2gosqlitewrapper.c: fix implicit declaration of execv(). Cherry-picked from release/4.0.1.x branch. --- debian/changelog | 1 + libx2go-server-db-perl/src/libx2go-server-db-sqlite3-wrapper.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/debian/changelog b/debian/changelog index b8444a9..43b6cfc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -342,6 +342,7 @@ x2goserver (4.0.1.21-0x2go1) UNRELEASED; urgency=medium - x2goserver/bin/x2goruncommand: stop exporting LD_LIBRARY_PATH when using Arctica's nx-libs and its new Xinerama feature. Fixes: #1153. - Make x2goruncommand aware of the LXQt desktop shell. + - x2goserver/x2gosqlitewrapper.c: fix implicit declaration of execv(). -- X2Go Release Manager <git-admin@x2go.org> Sun, 20 Nov 2016 12:54:13 +0100 diff --git a/libx2go-server-db-perl/src/libx2go-server-db-sqlite3-wrapper.c b/libx2go-server-db-perl/src/libx2go-server-db-sqlite3-wrapper.c index e4f19dc..927addf 100644 --- a/libx2go-server-db-perl/src/libx2go-server-db-sqlite3-wrapper.c +++ b/libx2go-server-db-perl/src/libx2go-server-db-sqlite3-wrapper.c @@ -20,6 +20,8 @@ * */ +#include <unistd.h> + int main( int argc, char *argv[] ) { char x2gosqlitewrapper[] = TRUSTED_BINARY; -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit 89ae4d3eb5bc5fcbd5f69239704d4f48daf51be3 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Oct 11 07:16:14 2017 +0200 x2goserver/bin/x2golistshadowsessions: whitespace only. Cherry-picked from release/4.0.1.x branch. --- debian/changelog | 1 + x2goserver/bin/x2golistshadowsessions | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 43b6cfc..cc0740e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -273,6 +273,7 @@ x2goserver (4.0.1.21-0x2go1) UNRELEASED; urgency=medium not rely on the HOSTNAME variable. The latter is only set automatically by bash if it's not already part of the environment. We might get "garbage" in this way (and one user actually did.) + - x2goserver/bin/x2golistshadowsessions: whitespace only. * x2goserver.spec: - Add mandatory perl-generators Build-Requires as per https://fedoraproject.org/wiki/Changes/Build_Root_Without_Perl diff --git a/x2goserver/bin/x2golistshadowsessions b/x2goserver/bin/x2golistshadowsessions index 78e8ae6..2c604c5 100755 --- a/x2goserver/bin/x2golistshadowsessions +++ b/x2goserver/bin/x2golistshadowsessions @@ -65,7 +65,7 @@ for (my $i=0;$i<@outp;$i++) print "@outp[$i]\n"; } else - { + { if (@sinfo[4]eq 'R') { my $shadow_user = @sinfo[1]; @@ -81,5 +81,5 @@ for (my $i=0;$i<@outp;$i++) } } -# closing syslog +# closing syslog closelog; -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit 790b996b3d1c53a180e18f6109240fa4980822ef Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Oct 11 07:42:41 2017 +0200 x2goserver/sbin/x2gocleansessions: close syslog at program exit. Cherry-picked from release/4.0.1.x branch. --- debian/changelog | 1 + x2goserver/sbin/x2gocleansessions | 2 ++ 2 files changed, 3 insertions(+) diff --git a/debian/changelog b/debian/changelog index cc0740e..1810c58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -274,6 +274,7 @@ x2goserver (4.0.1.21-0x2go1) UNRELEASED; urgency=medium by bash if it's not already part of the environment. We might get "garbage" in this way (and one user actually did.) - x2goserver/bin/x2golistshadowsessions: whitespace only. + - x2goserver/sbin/x2gocleansessions: close syslog at program exit. * x2goserver.spec: - Add mandatory perl-generators Build-Requires as per https://fedoraproject.org/wiki/Changes/Build_Root_Without_Perl diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions index c2a8e8c..8a36044 100755 --- a/x2goserver/sbin/x2gocleansessions +++ b/x2goserver/sbin/x2gocleansessions @@ -80,6 +80,7 @@ sub check_pid sub catch_term { unlink("/var/run/x2goserver.pid"); + closelog; exit; } @@ -113,6 +114,7 @@ elsif ($pid != 0) open (F,">/var/run/x2goserver.pid"); print F "$pid\n"; close(F); + closelog; } elsif ($pid == 0 ) { -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit a93efd2058704e5f6e25458b03c9bbcbdd8cb94c Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Oct 11 08:02:52 2017 +0200 x2goserver/sbin/x2gocleansessions: whitespace only. Cherry-picked from release/4.0.1.x branch. --- debian/changelog | 1 + x2goserver/sbin/x2gocleansessions | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1810c58..5c2e4d5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -275,6 +275,7 @@ x2goserver (4.0.1.21-0x2go1) UNRELEASED; urgency=medium "garbage" in this way (and one user actually did.) - x2goserver/bin/x2golistshadowsessions: whitespace only. - x2goserver/sbin/x2gocleansessions: close syslog at program exit. + - x2goserver/sbin/x2gocleansessions: whitespace only. * x2goserver.spec: - Add mandatory perl-generators Build-Requires as per https://fedoraproject.org/wiki/Changes/Build_Root_Without_Perl diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions index 8a36044..dbaa7c4 100755 --- a/x2goserver/sbin/x2gocleansessions +++ b/x2goserver/sbin/x2gocleansessions @@ -105,11 +105,11 @@ if (! $debug) $pid = fork(); } -if ((!$debug) && (not defined $pid)) +if ((!$debug) && (not defined $pid)) { print "resources not avilable.\n"; } -elsif ($pid != 0) +elsif ($pid != 0) { open (F,">/var/run/x2goserver.pid"); print F "$pid\n"; @@ -119,7 +119,7 @@ elsif ($pid != 0) elsif ($pid == 0 ) { # check if we are to use the superenicer script for throttling does the nice level - # of suspended sessions... + # of suspended sessions... my $Config = get_config(); my $superenice_enable = is_true($Config->param("superenicer.enable")); @@ -412,4 +412,3 @@ This manual has been written by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> for the X2Go project (http://www.x2go.org). =cut - -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit ba57134d966c3225e9af44cd676e7b0c440e4785 Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Oct 11 08:14:50 2017 +0200 debian/changelog: merge in changes from current release branch. --- debian/changelog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/changelog b/debian/changelog index 5c2e4d5..e703a88 100644 --- a/debian/changelog +++ b/debian/changelog @@ -276,6 +276,10 @@ x2goserver (4.0.1.21-0x2go1) UNRELEASED; urgency=medium - x2goserver/bin/x2golistshadowsessions: whitespace only. - x2goserver/sbin/x2gocleansessions: close syslog at program exit. - x2goserver/sbin/x2gocleansessions: whitespace only. + - x2goserver/bin/x2golistshadowsessions: copy and use a few needed utility + functions from x2gocleansessions. + - x2goserver/bin/x2golistshadowsessions: mark unavailable functionality + with FIXME comments. * x2goserver.spec: - Add mandatory perl-generators Build-Requires as per https://fedoraproject.org/wiki/Changes/Build_Root_Without_Perl @@ -346,6 +350,7 @@ x2goserver (4.0.1.21-0x2go1) UNRELEASED; urgency=medium Arctica's nx-libs and its new Xinerama feature. Fixes: #1153. - Make x2goruncommand aware of the LXQt desktop shell. - x2goserver/x2gosqlitewrapper.c: fix implicit declaration of execv(). + - x2goserver/: backport x2golistshadowsessions. -- X2Go Release Manager <git-admin@x2go.org> Sun, 20 Nov 2016 12:54:13 +0100 -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git