Subject: Bug#356: Fwd: [X2Go-User] x2gocleansessions fix

From: Mike Gabriel <[email-masked]>
Date: Sat, 07 Dec 2013 22:15:18 +0000

Package: x2goserver
Severity: important
Version: 4.0.0.7

Hi Gerald,

thanks for this pointer. Let's get this into X2Go Server LTS (aka Baikal).

Mike

----- Weitergeleitete Nachricht von Gerald Richter - ECOS  
<[email-masked]> -----
   Datum: Fri, 6 Dec 2013 06:46:43 +0100
     Von: Gerald Richter - ECOS <[email-masked]>
Betreff: [X2Go-User] x2gocleansessions fix
      An: "[email-masked]" <[email-masked]>

Hi,

x2gocleansessions sometimes fails for me, because there is a lot of  
extra output in the log like “Proxy: WARNING! Detected drift in system  
timer. Resetting to current time.”. The following patch fixes the  
problem:

--- /usr/sbin/x2gocleansessions.orig     2013-12-06 06:37:46.000000000 +0100

+++ /usr/sbin/x2gocleansessions           2013-12-06 06:38:45.000000000 +0100

@@ -56,7 +56,7 @@

                 my $sess=shift;

                 my $user=shift;

                 my $log="/tmp/.x2go-${user}/session-C-${sess}.log";

-              my $text=`tail -1 $log 2>/dev/null`;

+             my $text=`grep Session: $log 2>/dev/null|tail -1`;

                 if ($text =~ m/Session suspended/)

                 {

                                return 0;

Regards

Gerald

----- Ende der weitergeleiteten Nachricht -----

-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: [email-masked], http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb