[X2go-Commits] x2goserver.git - master (branch) updated: 3.1.0.1-18-gbf935ac

X2Go dev team git-admin at x2go.org
Thu Mar 15 11:10:49 CET 2012


The branch, master has been updated
       via  bf935ac7259bec7d23e6ffd3605ceae7de793b1d (commit)
       via  e2dce016a660b225acf1b0376daa3de9c2b09899 (commit)
      from  c89c4c1b3f57a5f8fb1cf476839f48ecc54ab479 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bf935ac7259bec7d23e6ffd3605ceae7de793b1d
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Mar 15 11:09:27 2012 +0100

    solving syslogging issue in x2gosqlitewrapper.pl by code duplications :-(

commit e2dce016a660b225acf1b0376daa3de9c2b09899
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Mar 15 10:23:43 2012 +0100

    Specify non-sbin path in x2gosqlitewrapper.c. Allows us to do system calls in x2gosqlitewrapper.pl.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                    |    2 ++
 x2goserver/lib/x2gosqlitewrapper.pl |   30 ++++++++++++++++++++++++++++--
 2 files changed, 30 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 2e42dad..9c1fa64 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ x2goserver (3.1.1.0-0~x2go1) UNRELEASED; urgency=low
     - Update date and version number in man pages.
     - Add syslogging to SQLite3 session DB backend for occuring
       DB failures.
+    - Specify non-sbin path in x2gosqlitewrapper.c. Allows us
+      to do system calls in x2gosqlitewrapper.pl.
   * Remove /etc/x2go/applications on package removal if it is a
     symlink, keep it, if it is a directory. Remove /etc/x2go
     (if empty after purge) on package purge.
diff --git a/x2goserver/lib/x2gosqlitewrapper.pl b/x2goserver/lib/x2gosqlitewrapper.pl
index c8752e1..cb71017 100755
--- a/x2goserver/lib/x2gosqlitewrapper.pl
+++ b/x2goserver/lib/x2gosqlitewrapper.pl
@@ -24,8 +24,34 @@ use strict;
 use DBI;
 use POSIX;
 use Sys::Syslog qw( :standard :macros );
-use lib `echo -n \$(x2gobasepath)/lib/x2go`;
-use x2gologlevel;
+
+#### NOTE: this script is run setgid <group> and it cannot do system() calls.
+
+####
+#### One consequence of this is...
+#### This first part of code that handles syslogging is duplicated from
+#### x2gologlevel.pm. This is because we are not able to detect the
+#### installation path automatically via the x2gobasepath in this
+#### script.
+####
+
+my $Config = new Config::Simple(syntax=>'ini');
+$Config->read('/etc/x2go/x2goserver.conf' );
+my $strloglevel = $Config->param("log.loglevel");
+my $loglevel = LOG_NOTICE;
+if    ( $strloglevel eq "emerg" )  { $loglevel = LOG_EMERG; }
+elsif ( $strloglevel eq "alert" )  { $loglevel = LOG_ALERT; }
+elsif ( $strloglevel eq "crit" )   { $loglevel = LOG_CRIT; }
+elsif ( $strloglevel eq "err" )    { $loglevel = LOG_ERR; }
+elsif ( $strloglevel eq "warning" )   { $loglevel = LOG_WARNING; }
+elsif ( $strloglevel eq "notice" ) { $loglevel = LOG_NOTICE; }
+elsif ( $strloglevel eq "info" )   { $loglevel = LOG_INFO; }
+elsif ( $strloglevel eq "debug" )  { $loglevel = LOG_DEBUG; }
+setlogmask( LOG_UPTO(x2gologlevel()) );
+
+####
+#### end of duplicated syslogging code
+####
 
 # retrieve home dir of x2gouser
 my $x2gouser='x2gouser';


hooks/post-receive
-- 
x2goserver.git (X2Go Server)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goserver.git" (X2Go Server).




More information about the x2go-commits mailing list