[X2Go-Commits] x2goserver.git - build-baikal (branch) updated: 3.1.0.1-18-gbf935ac
X2Go dev team
git-admin at x2go.org
Wed Dec 4 06:22:05 CET 2013
The branch, build-baikal has been updated
via bf935ac7259bec7d23e6ffd3605ceae7de793b1d (commit)
from e2dce016a660b225acf1b0376daa3de9c2b09899 (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 -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
x2goserver/lib/x2gosqlitewrapper.pl | 30 ++++++++++++++++++++++++++++--
x2goserver/x2gosqlitewrapper.c | 2 +-
2 files changed, 29 insertions(+), 3 deletions(-)
The diff of changes is:
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';
diff --git a/x2goserver/x2gosqlitewrapper.c b/x2goserver/x2gosqlitewrapper.c
index 78ea68d..a134efc 100644
--- a/x2goserver/x2gosqlitewrapper.c
+++ b/x2goserver/x2gosqlitewrapper.c
@@ -60,7 +60,7 @@ int main( int argc, char *argv[] ) {
}
// derive the full path of x2gosqlitewrapper.pl from path of this binary
- rvap = asprintf(&x2gosqlitewrapper, "PATH=/usr/local/bin:/usr/bin/:/bin %s/%s", dirname(buffer), "x2gosqlitewrapper.pl");
+ rvap = asprintf(&x2gosqlitewrapper, "%s/%s", dirname(buffer), "x2gosqlitewrapper.pl");
if(rvap == -1){
fprintf(stderr, "Failed to allocate memory calling asprintf\n");
exit(EXIT_FAILURE);
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