[X2Go-Commits] [x2goserver] 02/03: x2gocleansessions: Call x2gormforward also on terminated sessions. This will make sure that re-assigned ports are really available on new session startup.

git-admin at x2go.org git-admin at x2go.org
Fri Oct 17 11:33:45 CEST 2014


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

x2go pushed a commit to branch master
in repository x2goserver.

commit 7f0b260577df3dfa666294833610d4a1c02fdb9d
Author: Mike Gabriel <mike.gabriel at 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 7dffcee..85a5ebc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -154,6 +154,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 5fad4b2..1ee636d 100755
--- a/x2goserver/sbin/x2gocleansessions
+++ b/x2goserver/sbin/x2gocleansessions
@@ -178,6 +178,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], at sinfo[1], at sinfo[12]))
 			{
@@ -230,6 +232,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


More information about the x2go-commits mailing list