This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch release/4.0.1.x in repository x2goserver. from 71c053a Use %{_localstatedir} instead of %{_sharedstatedir}. new 395d4b4 Fix gramma in error message (in x2goresume-session). new fc53bd5 x2gocleansessions: Call x2gormforward also on terminated sessions. This will make sure that re-assigned ports are really available on new session startup. new fcbd37b x2golistsessions(_root): Only update session state in session DB if x2goagent's state file really exists. This addresses a problem that occurs when x2golistsessions gets called via an x2gobroker-agent. The x2golistsessions script may show session states (--all-servers) of sessions on other servers that have session states files on their remote /tmp dirs. These files are not accessible for that x2golistsessions script and should simply be ignored. The 3 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 | 11 +++++++++++ x2goserver/bin/x2golistsessions | 15 +++++++++++++-- x2goserver/bin/x2goresume-session | 2 +- x2goserver/sbin/x2gocleansessions | 4 ++++ x2goserver/sbin/x2golistsessions_root | 14 +++++++++++++- 5 files changed, 42 insertions(+), 4 deletions(-) -- Alioth's /srv/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 release/4.0.1.x in repository x2goserver. commit fc53bd55382ec39ff44253659d46714df9584c8a Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Oct 17 10:32:15 2014 +0200 x2gocleansessions: Call x2gormforward also on terminated sessions. This will make sure that re-assigned ports are really available on new session startup. --- debian/changelog | 3 +++ x2goserver/sbin/x2gocleansessions | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 936d33a..9632df3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,9 @@ x2goserver (4.0.1.19-0x2go1) UNRELEASED; urgency=medium - x2gosqlitewrapper.c: Fix rpmlint error: no-return-in-nonvoid-function. Return the exitcode of execve(). - Fix gramma in error message (in x2goresume-session). + - x2gocleansessions: Call x2gormforward also on terminated sessions. This + will make sure that re-assigned ports are really available on new session + startup. * debian/control: + Add D (x2goserver): libfile-which-perl. * x2goserver.spec: diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions index e576e60..b7845e8 100755 --- a/x2goserver/sbin/x2gocleansessions +++ b/x2goserver/sbin/x2gocleansessions @@ -213,6 +213,8 @@ elsif ($pid == 0 ) } syslog('debug', "@sinfo[1]: unmounting all shares"); system( "su", "@sinfo[11]", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]"); + #remove port forwarding + system("su", "@sinfo[11]", "-c", "$x2go_lib_path/x2gormforward @sinfo[1]"); } elsif (! check_pid (@sinfo[0],@sinfo[1],@sinfo[12])) { @@ -265,6 +267,8 @@ elsif ($pid == 0 ) system("su", "@sinfo[11]", "-c", "export HOSTNAME && x2goumount-session @sinfo[1]"); system("su", "@sinfo[11]", "-c", "x2goterminate-session @sinfo[1]"); syslog('debug', "@sinfo[1] has been requested for termination via the session DB"); + #remove port forwarding + system("su", "@sinfo[11]", "-c", "$x2go_lib_path/x2gormforward @sinfo[1]"); } } } -- Alioth's /srv/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 release/4.0.1.x in repository x2goserver. commit fcbd37ba54b1f3bc983f90c1e974e1c9fc5d8bbf Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Oct 17 11:17:42 2014 +0200 x2golistsessions(_root): Only update session state in session DB if x2goagent's state file really exists. This addresses a problem that occurs when x2golistsessions gets called via an x2gobroker-agent. The x2golistsessions script may show session states (--all-servers) of sessions on other servers that have session states files on their remote /tmp dirs. These files are not accessible for that x2golistsessions script and should simply be ignored. --- debian/changelog | 7 +++++++ x2goserver/bin/x2golistsessions | 15 +++++++++++++-- x2goserver/sbin/x2golistsessions_root | 14 +++++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9632df3..90e409f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,13 @@ x2goserver (4.0.1.19-0x2go1) UNRELEASED; urgency=medium - x2gocleansessions: Call x2gormforward also on terminated sessions. This will make sure that re-assigned ports are really available on new session startup. + - x2golistsessions(_root): Only update session state in session DB if + x2goagent's state file really exists. This addresses a problem that occurs + when x2golistsessions gets called via an x2gobroker-agent. The + x2golistsessions script may show session states (--all-servers) of + sessions on other servers that have session states files on their remote + /tmp dirs. These files are not accessible for that x2golistsessions script + and should simply be ignored. (Fixes: #638). * debian/control: + Add D (x2goserver): libfile-which-perl. * x2goserver.spec: diff --git a/x2goserver/bin/x2golistsessions b/x2goserver/bin/x2golistsessions index dc78ec3..af26e99 100755 --- a/x2goserver/bin/x2golistsessions +++ b/x2goserver/bin/x2golistsessions @@ -66,10 +66,21 @@ sub is_running return 0; } -sub get_agent_state + +sub has_agent_state_file { my $sess=@_[0]; my $user=@_[1]; + my $stateFile = "/tmp/.x2go-".$user."/C-".$sess."/state"; + if ( -e $stateFile ) + { + return 1; + } + return 0; +} + +sub get_agent_state +{ my $state; my $stateFile = "/tmp/.x2go-".$user."/C-".$sess."/state"; if (! -e $stateFile ) @@ -113,7 +124,7 @@ for (my $i=0;$i<@outp;$i++) { print "@outp[$i]\n"; } - else + else if (has_agent_state_file(@sinfo[1], @sinfo[11])) { if (@sinfo[4]eq 'R') { diff --git a/x2goserver/sbin/x2golistsessions_root b/x2goserver/sbin/x2golistsessions_root index d562fa3..7e10872 100755 --- a/x2goserver/sbin/x2golistsessions_root +++ b/x2goserver/sbin/x2golistsessions_root @@ -41,6 +41,18 @@ sub is_suspended return 0; } +sub has_agent_state_file +{ + my $sess=@_[0]; + my $user=@_[1]; + my $stateFile = "/tmp/.x2go-".$user."/C-".$sess."/state"; + if ( -e $stateFile ) + { + return 1; + } + return 0; +} + sub get_agent_state { my $sess=@_[0]; @@ -83,7 +95,7 @@ for (my $i=0;$i<@outp;$i++) { print "@outp[$i]\n"; } - else + else if (has_agent_state_file(@sinfo[1],@sinfo[11])) { if (@sinfo[4]eq 'R') { -- Alioth's /srv/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 release/4.0.1.x in repository x2goserver. commit 395d4b4001aaba1b897494259f3f008fd5bcb992 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Oct 17 10:30:47 2014 +0200 Fix gramma in error message (in x2goresume-session). --- debian/changelog | 1 + x2goserver/bin/x2goresume-session | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a0f109f..936d33a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,7 @@ x2goserver (4.0.1.19-0x2go1) UNRELEASED; urgency=medium SUSE system recognition). - x2gosqlitewrapper.c: Fix rpmlint error: no-return-in-nonvoid-function. Return the exitcode of execve(). + - Fix gramma in error message (in x2goresume-session). * debian/control: + Add D (x2goserver): libfile-which-perl. * x2goserver.spec: diff --git a/x2goserver/bin/x2goresume-session b/x2goserver/bin/x2goresume-session index d3ee51f..b514e03 100755 --- a/x2goserver/bin/x2goresume-session +++ b/x2goserver/bin/x2goresume-session @@ -83,7 +83,7 @@ do i=$(($i+1)) if [ $i -gt 45 ] then - echo "Error: taking too long to suspend session. Possible session is damaged" + echo "Error: taking too long to suspend session. It is possible that the session is damaged." exit -1; fi STATE=`$X2GO_LIB_PATH/x2gogetagentstate "$SESSION_NAME"` -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git