The branch, build-main has been updated
via f1ea959ac2800e88d57018b80b648f7ab48fc9a8 (commit)
from 80fd7e03f7094ef1dcc3e61d9d4e30a5020ed78a (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:
x2gobroker/…
[View More]loggers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
The diff of changes is:
diff --git a/x2gobroker/loggers.py b/x2gobroker/loggers.py
index 94e00ec..d7fb60a 100644
--- a/x2gobroker/loggers.py
+++ b/x2gobroker/loggers.py
@@ -39,7 +39,7 @@ else:
if getpass.getuser() == X2GOBROKER_DAEMON_USER:
# we run in standalone daemon mode, so let's use the system configuration for logging
- logging.config.fileConfig(_X2GOBROKER_LOGCONFIG)
+ logging.config.fileConfig(X2GOBROKER_LOGCONFIG)
# create loggers
logger_broker = logging.getLogger('broker')
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
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 "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via 441738987b1baad30e9195c811bce85b3cc6809e (commit)
from 0aca8cade7297dbe428473bcb5ca4e00d4f4bc10 (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:
debian/…
[View More]x2gobroker-daemon.init | 3 +++
1 file changed, 3 insertions(+)
The diff of changes is:
diff --git a/debian/x2gobroker-daemon.init b/debian/x2gobroker-daemon.init
index 7d945ed..fba7672 100755
--- a/debian/x2gobroker-daemon.init
+++ b/debian/x2gobroker-daemon.init
@@ -46,7 +46,10 @@ mkdir -p $RUNDIR/x2gobroker
chown $X2GOBROKER_DAEMON_USER:nogroup $RUNDIR/x2gobroker
chmod 0700 $RUNDIR/x2gobroker
+# mend user ID variables when --chuid $X2GOBROKER_DAEMON_USER is used with start-stop-daemon
export LOGNAME=$X2GOBROKER_DAEMON_USER
+export USER=$X2GOBROKER_DAEMON_USER
+export USERNAME=$X2GOBROKER_DAEMON_USER
export X2GOBROKER_DEBUG
export X2GOBROKER_DAEMON_USER
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
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 "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via 58da6a1d6504def84dccbc9f3328cca439fefa3b (commit)
from f1ea959ac2800e88d57018b80b648f7ab48fc9a8 (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:
debian/…
[View More]changelog | 2 ++
debian/x2gobroker-daemon.default | 5 ++++-
debian/x2gobroker-daemon.init | 8 +++++++-
x2gobroker/defaults.py | 14 ++++++++++++--
x2gobroker/loggers.py | 1 -
5 files changed, 25 insertions(+), 5 deletions(-)
mode change 100644 => 100755 debian/x2gobroker-daemon.init
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 467aa58..c7be8e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ x2gobroker (0.0.0.2-0~x2go1) UNRELEASED; urgency=low
- Add man page for x2gobroker executable.
- Add logrotate configuration for x2gobroker log files.
- Make the daemon user ID configurable through x2gobroker-daemon.default.
+ - Handle different situation for X2GOBROKER_DAEMON_USER. Make sure
+ the getpass.getuser() function sees the correct effective UID.
* /debian/control:
+ Add bin:package x2gobroker-agent.
diff --git a/debian/x2gobroker-daemon.default b/debian/x2gobroker-daemon.default
index 589aedb..8b8bea2 100644
--- a/debian/x2gobroker-daemon.default
+++ b/debian/x2gobroker-daemon.default
@@ -3,7 +3,10 @@
# Uncomment to enable the X2Go Session Broker standalone daemon
START_DAEMON=true
-# the posix user ID the broker runs under
+# the posix user ID the broker runs under (do not change!)
+# if you change it nonetheless, make sure that the log file
+# directory (default: /var/log/x2gobroker) and files in there are
+# writable by that user
#X2GOBROKER_DAEMON_USER=x2gobroker
# run XGo Session Broker in debug mode, this will make the broker
diff --git a/debian/x2gobroker-daemon.init b/debian/x2gobroker-daemon.init
old mode 100644
new mode 100755
index 4d89e64..789291b
--- a/debian/x2gobroker-daemon.init
+++ b/debian/x2gobroker-daemon.init
@@ -37,6 +37,12 @@ X2GOBROKER_SSL_CERTFILE=
X2GOBROKER_SSL_KEYFILE=
test -f $DEBIANCONFIG && . $DEBIANCONFIG
+if ! getent passwd $X2GOBROKER_DAEMON_USER 1>/dev/null 2>/dev/null; then
+ X2GOBROKER_DAEMON_USER=nobody
+fi
+
+export LOGNAME=$X2GOBROKER_DAEMON_USER
+
export X2GOBROKER_DEBUG
export X2GOBROKER_DAEMON_USER
export X2GOBROKER_CONFIG
@@ -62,7 +68,7 @@ case "${1:-}" in
log_daemon_msg "Starting X2Go Session Broker standalone daemon" "x2gobroker"
mkdir -p $RUNDIR
set +e
- start-stop-daemon -u $X2GOBROKER_DAEMON_USER -b -m -S -p $PIDFILE -x $DAEMON -- -b $DAEMON_BIND_ADDRESS
+ start-stop-daemon --chuid $X2GOBROKER_DAEMON_USER -b -m -S -p $PIDFILE -x $DAEMON -- -b $DAEMON_BIND_ADDRESS
log_end_msg $?
set -e
fi
diff --git a/x2gobroker/defaults.py b/x2gobroker/defaults.py
index 1f250c2..4099d57 100644
--- a/x2gobroker/defaults.py
+++ b/x2gobroker/defaults.py
@@ -39,15 +39,25 @@ else:
X2GOBROKER_DEBUG = False
if X2GOBROKER_USER != X2GOBROKER_DAEMON_USER:
X2GOBROKER_DEBUG = True
-
+X2GOBROKER_DEBUG = True
if X2GOBROKER_DEBUG:
logger_broker.setLevel(logging.DEBUG)
logger_access.setLevel(logging.DEBUG)
logger_error.setLevel(logging.DEBUG)
-if X2GOBROKER_USER != X2GOBROKER_DAEMON_USER:
+logger_broker.warn('os.getuid() = %s' % os.getuid())
+logger_broker.warn('os.geteuid() = %s' % os.geteuid())
+logger_broker.warn('getpass.getuser() = %s' % getpass.getuser())
+
+# check effective UID the broker runs as and complain appropriately...
+if X2GOBROKER_USER != X2GOBROKER_DAEMON_USER and os.geteuid() != 0:
logger_broker.warn('X2Go Session Broker has been started interactively by user {username}, better run as user {daemon_username}.'.format(username=X2GOBROKER_USER, daemon_username=X2GOBROKER_DAEMON_USER))
logger_broker.info('Automatically switching to DEBUG mode due to interactive launch of this application.')
+elif X2GOBROKER_DAEMON_USER != 'root' and os.geteuid() == 0:
+ logger_broker.warn('X2Go Session Broker should not be run as root, better run as user {daemon_username}.'.format(daemon_username=X2GOBROKER_DAEMON_USER))
+elif os.geteuid() == 0:
+ logger_broker.warn('X2Go Session Broker should not be run as root, better run as non-privileged user')
+
logger_broker.info('Setting up the broker\'s environment...')
logger_broker.info(' X2GOBROKER_DEBUG: {value}'.format(value=X2GOBROKER_DEBUG))
diff --git a/x2gobroker/loggers.py b/x2gobroker/loggers.py
index d7fb60a..7791bbd 100644
--- a/x2gobroker/loggers.py
+++ b/x2gobroker/loggers.py
@@ -65,4 +65,3 @@ else:
logger_error = logging.getLogger('error')
logger_error.addHandler(stdout_handler)
logger_error.propagate = 0
-
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
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 "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via 0aca8cade7297dbe428473bcb5ca4e00d4f4bc10 (commit)
from 499a783d677c3610974fdffd48573ff5037194a5 (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:
x2gobroker/…
[View More]defaults.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
The diff of changes is:
diff --git a/x2gobroker/defaults.py b/x2gobroker/defaults.py
index fdbd881..d52a485 100644
--- a/x2gobroker/defaults.py
+++ b/x2gobroker/defaults.py
@@ -39,7 +39,7 @@ else:
X2GOBROKER_DEBUG = False
if X2GOBROKER_USER != X2GOBROKER_DAEMON_USER:
X2GOBROKER_DEBUG = True
-X2GOBROKER_DEBUG = True
+
if X2GOBROKER_DEBUG:
logger_broker.setLevel(logging.DEBUG)
logger_access.setLevel(logging.DEBUG)
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
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 "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via fe7f06c112518bbac361c7e9f80ed721379a0e3b (commit)
from 5231ba48183cc603a5193400884dd01b360491ba (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:
debian/…
[View More]x2gobroker-daemon.default | 9 ++++++++-
debian/x2gobroker-daemon.init | 6 +++---
etc/x2gobroker.conf | 2 +-
sbin/x2gobroker | 3 +++
4 files changed, 15 insertions(+), 5 deletions(-)
The diff of changes is:
diff --git a/debian/x2gobroker-daemon.default b/debian/x2gobroker-daemon.default
index 47ccb43..452a75b 100644
--- a/debian/x2gobroker-daemon.default
+++ b/debian/x2gobroker-daemon.default
@@ -24,7 +24,14 @@ START_DAEMON=true
# path to the X2Go Session Broker's agent command
#X2GOBROKER_AGENT_CMD=/usr/lib/x2go/x2gobroker-agent
-### enable SSL, you will have to create your own SSL certificates ###
+##########################################################
+### ###
+### Enable SSL Support ###
+### o You have to create your own SSL certificates ###
+### o You have to actively uncomment the below SSL ###
+### relevant line to enable https:// in x2gobroker ###
+### ###
+##########################################################
# SSL certificate file
#X2GOBROKER_SSL_CERTFILE=/etc/x2go/broker/ssl/broker.crt
diff --git a/debian/x2gobroker-daemon.init b/debian/x2gobroker-daemon.init
index 0ee9aed..d14bb8f 100644
--- a/debian/x2gobroker-daemon.init
+++ b/debian/x2gobroker-daemon.init
@@ -36,10 +36,10 @@ X2GOBROKER_SSL_CERTFILE=
X2GOBROKER_SSL_KEYFILE=
test -f $DEBIANCONFIG && . $DEBIANCONFIG
-export X2GOBROKER_DEBUG=0
-export X2GOBROKER_CONFIG="/etc/x2go/x2gobroker.conf"
+export X2GOBROKER_DEBUG
+export X2GOBROKER_CONFIG
export X2GOBROKER_DEFAULT_BACKEND
-export X2GOBROKER_SESSIONPROFILES="/etc/x2go/broker/x2gobroker-sessionprofiles.conf"
+export X2GOBROKER_SESSIONPROFILES
export X2GOBROKER_AGENT_CMD
export X2GOBROKER_SSL_CERTFILE
export X2GOBROKER_SSL_KEYFILE
diff --git a/etc/x2gobroker.conf b/etc/x2gobroker.conf
index 0999376..83f6bd8 100644
--- a/etc/x2gobroker.conf
+++ b/etc/x2gobroker.conf
@@ -88,7 +88,7 @@
# on large deployments it is recommended to ignore primary group memberships
# traversing into all user accounts for primary group detection can be quite
# CPU intensive on the X2Go Broker server.
-#ignore-primary-group-memberships = True
+#ignore-primary-group-memberships = true
###
### BACKEND section
diff --git a/sbin/x2gobroker b/sbin/x2gobroker
index 5c1fdd8..7ca11ce 100755
--- a/sbin/x2gobroker
+++ b/sbin/x2gobroker
@@ -61,6 +61,9 @@ if __name__ == "__main__":
x2gobroker.defaults.X2GOBROKER_CONFIG = cmdline_args.config_file
x2gobroker.defaults.X2GOBROKER_DEBUG = cmdline_args.debug
+ # some people just give the port but prepend a colon, webpy does not like this, so we strip if off
+ cmdline_args.bind = cmdline_args.bind.lstrip(':')
+
# import classes serving the different web.py URLs
from x2gobroker.web.plain import *
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
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 "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via d04c71a2781be037ebbb3bdc9441019409c9c2a8 (commit)
from bbe2c8ab570f8f3e4b0e54a79117b9d93488de40 (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:
debian/…
[View More]changelog | 1 +
debian/x2gobroker.manpages | 1 +
man/man8/x2gobroker.8 | 56 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 58 insertions(+)
create mode 100644 debian/x2gobroker.manpages
create mode 100644 man/man8/x2gobroker.8
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index c8ec285..f1e7e25 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ x2gobroker (0.0.0.2-0~x2go1) UNRELEASED; urgency=low
- Make host session option a list, not string.
- Add load balancing support.
- Add foundation for logging support.
+ - Add man page for x2gobroker executable.
* /debian/control:
+ Add bin:package x2gobroker-agent.
diff --git a/debian/x2gobroker.manpages b/debian/x2gobroker.manpages
new file mode 100644
index 0000000..b010d6d
--- /dev/null
+++ b/debian/x2gobroker.manpages
@@ -0,0 +1 @@
+man/man8/x2gobroker.8
\ No newline at end of file
diff --git a/man/man8/x2gobroker.8 b/man/man8/x2gobroker.8
new file mode 100644
index 0000000..6782fda
--- /dev/null
+++ b/man/man8/x2gobroker.8
@@ -0,0 +1,56 @@
+'\" -*- coding: utf-8 -*-
+.if \n(.g .ds T< \\FC
+.if \n(.g .ds T> \\F[\n[.fam]]
+.de URL
+\\$2 \(la\\$1\(ra\\$3
+..
+.if \n(.g .mso www.tmac
+.TH x2gobroker 8 "Feb 2013" "Version 0.0.1.y" "X2Go Session Broker"
+.SH NAME
+x2gobroker \- Session Broker for X2Go
+.SH SYNOPSIS
+'nh
+.fi
+.ad l
+\fBx2gobroker\fR \kx
+.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
+'in \n(.iu+\nxu
+[
+\fIoptions\fR
+]
+'in \n(.iu-\nxu
+.ad b
+'hy
+.SH DESCRIPTION
+\fBx2gobroker\fR is a Web.py based implementation of the X2Go Session Broker API.
+.PP
+See the included README and TODO for further information on \fBx2gobroker\fR.
+.SH COMMON OPTIONS
+\fBx2gobroker\fR accepts the following common options:
+.TP
+\*(T<\fB\-h, \-\-help\fR\*(T>
+Display a help with all available command line options and exit.
+.TP
+\*(T<\fB\-d, \-\-debug\fR\*(T>
+Enable debugging code. This also makes http\'s POST method available as GET method, which then allows it to test the
+broker API through a normal web browser.
+.TP
+\*(T<\fB\-d, \-\-config FILENAME\fR\*(T>
+Specify an alternative configuration file name, default is: \fI/etc/x2go/x2gobroker.conf\fR.
+.SH DAEMON OPTIONS
+\fBx2gobroker\fR accepts the following daemon options:
+.TP
+\*(T<\fB\-b, \-\-bind ADDRESS:PORT\fR\*(T>
+The [address:]port that the Web.py http-engine will bind to (default: 127.0.0.1:8080).
+.SH "FILES"
+/etc/x2go/x2gobroker.conf, /etc/x2go/broker/* (configuration files)
+.PP
+/etc/default/x2gobroker-daemon (environment for X2Go Session Broker when run
+as standalone daemon)
+.PP
+/var/log/x2gobroker/* (log files of X2Go Session Broker)
+.SH "SEE ALSO"
+\fB/usr/share/doc/x2gobroker\fR
+.SH AUTHOR
+This manual has been written for the X2Go project by
+Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de>.
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
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 "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via 716736e53b9bf284d5bc196b708bc3b2362b50a4 (commit)
from d424e129de63d2fd187d1364bf5d2791d74571be (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:
etc/broker/…
[View More]x2gobroker-sessionprofiles.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
The diff of changes is:
diff --git a/etc/broker/x2gobroker-sessionprofiles.conf b/etc/broker/x2gobroker-sessionprofiles.conf
index f84e097..d797697 100644
--- a/etc/broker/x2gobroker-sessionprofiles.conf
+++ b/etc/broker/x2gobroker-sessionprofiles.conf
@@ -55,7 +55,7 @@ sshport=22
setdpi=0
pack=16m-jpeg
-##
+##
## pool-A (staff servers)
##
## The pool-A contains three X2Go Servers (server-A, server-B and server-C).
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
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 "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via bbe2c8ab570f8f3e4b0e54a79117b9d93488de40 (commit)
from fe7f06c112518bbac361c7e9f80ed721379a0e3b (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:
debian/…
[View More]changelog | 1 +
debian/python-x2gobroker.dirs | 3 +-
...r-agent.postinst => python-x2gobroker.postinst} | 27 +------
...roker-agent.postrm => python-x2gobroker.postrm} | 11 +--
etc/broker/x2gobroker-loggers.conf | 81 ++++++++++++++++++++
x2gobroker/defaults.py | 5 ++
x2gobroker/{brokers/ldap_broker.py => loggers.py} | 20 ++---
7 files changed, 107 insertions(+), 41 deletions(-)
copy debian/{x2gobroker-agent.postinst => python-x2gobroker.postinst} (51%)
copy debian/{x2gobroker-agent.postrm => python-x2gobroker.postrm} (70%)
create mode 100644 etc/broker/x2gobroker-loggers.conf
copy x2gobroker/{brokers/ldap_broker.py => loggers.py} (68%)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 0984633..c8ec285 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ x2gobroker (0.0.0.2-0~x2go1) UNRELEASED; urgency=low
- Make CC, CFLAGS and LDFLAGS configurable through build system.
- Make host session option a list, not string.
- Add load balancing support.
+ - Add foundation for logging support.
* /debian/control:
+ Add bin:package x2gobroker-agent.
diff --git a/debian/python-x2gobroker.dirs b/debian/python-x2gobroker.dirs
index 2fd303e..2396e1d 100644
--- a/debian/python-x2gobroker.dirs
+++ b/debian/python-x2gobroker.dirs
@@ -1,2 +1,3 @@
/etc/x2go
-/etc/pam.d
\ No newline at end of file
+/etc/pam.d
+/var/log/x2gobroker
\ No newline at end of file
diff --git a/debian/x2gobroker-agent.postinst b/debian/python-x2gobroker.postinst
similarity index 51%
copy from debian/x2gobroker-agent.postinst
copy to debian/python-x2gobroker.postinst
index 95faece..861b3e0 100755
--- a/debian/x2gobroker-agent.postinst
+++ b/debian/python-x2gobroker.postinst
@@ -1,13 +1,10 @@
#!/bin/sh
-# postinst script for x2gobroker-agent
+# postinst script for python-x2gobroker
#
# see: dh_installdeb(1)
set -e
-# Source debconf library.
-. /usr/share/debconf/confmodule
-
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
@@ -24,25 +21,9 @@ set -e
case "$1" in
configure)
- # setup user/group x2gobroker
- if ! getent group x2gobroker >/dev/null; then
- echo "Creating x2gobroker group." >&2
- addgroup --system x2gobroker
- else
- echo "Group x2gobroker already exists." >&2
- fi
- if ! getent passwd x2gobroker >/dev/null; then
- echo "Creating x2gobroker user." >&2
- adduser --system --no-create-home \
- --disabled-password --disabled-login \
- --shell /bin/false --group --home /dev/null x2gobroker
- else
- echo "User x2gobroker already exists." >&2
- fi
-
- # the x2gobroker-agent has to be installed setuid root
- if ! dpkg-statoverride --list /usr/lib/x2go/x2gobroker-agent >/dev/null; then
- dpkg-statoverride --add --update root x2gobroker 4750 /usr/lib/x2go/x2gobroker-agent
+ # the python-x2gobroker needs special permissions on its log directory
+ if ! dpkg-statoverride --list /var/log/x2gobroker >/dev/null; then
+ dpkg-statoverride --add --update x2gobroker adm 0750 /var/log/x2gobroker
fi
;;
diff --git a/debian/x2gobroker-agent.postrm b/debian/python-x2gobroker.postrm
similarity index 70%
copy from debian/x2gobroker-agent.postrm
copy to debian/python-x2gobroker.postrm
index d703d32..22abe93 100755
--- a/debian/x2gobroker-agent.postrm
+++ b/debian/python-x2gobroker.postrm
@@ -18,15 +18,10 @@ set -e
case "$1" in
purge)
- if dpkg-statoverride --list /usr/lib/x2go/x2gobroker-agent >/dev/null; then
- dpkg-statoverride --remove /usr/lib/x2go/x2gobroker-agent
+ if dpkg-statoverride --list /var/log/x2gobroker >/dev/null; then
+ dpkg-statoverride --remove /var/log/x2gobroker
fi
- # remove user/group x2gobroker from system
- getent passwd x2gobroker >/dev/null && deluser x2gobroker
- getent group x2gobroker >/dev/null && delgroup x2gobroker
- getent group x2gobroker >/dev/null && delgroup x2gobroker
-
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
@@ -41,4 +36,4 @@ esac
#DEBHELPER#
-exit 0
\ No newline at end of file
+exit 0
diff --git a/etc/broker/x2gobroker-loggers.conf b/etc/broker/x2gobroker-loggers.conf
new file mode 100644
index 0000000..36d5e3e
--- /dev/null
+++ b/etc/broker/x2gobroker-loggers.conf
@@ -0,0 +1,81 @@
+# This file is part of the X2Go Project - http://www.x2go.org
+# Copyright (C) 2011-2012 by Oleksandr Shneyder <oleksandr.shneyder(a)obviously-nice.de>
+# Copyright (C) 2011-2012 by Heinz-Markus Graesing <heinz-m.graesing(a)obviously-nice.de>
+# Copyright (C) 2012 by Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de>
+#
+# X2Go Session Broker is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# X2Go Session Broker is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+[loggers]
+keys=root,broker,access,error
+
+[logger_root]
+level=NOTSET
+handlers=stdoutHandler
+
+[handlers]
+keys=stdoutHandler,brokerFileHandler,accessFileHandler,errorFileHandler
+
+[formatters]
+keys=brokerFormatter,accessFormatter,errorFormatter
+
+[handler_stdoutHandler]
+class=StreamHandler
+args=(sys.stdout,)
+
+[logger_broker]
+level=DEBUG
+handlers=brokerFileHandler
+qualname=broker
+propagate=0
+
+[handler_brokerFileHandler]
+class=FileHandler
+formatter=brokerFormatter
+args=('/var/log/x2gobroker/broker.log',)
+
+[formatter_brokerFormatter]
+format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
+datefmt=
+
+[logger_access]
+level=DEBUG
+handlers=accessFileHandler
+qualname=access
+propagate=0
+
+[handler_accessFileHandler]
+class=FileHandler
+formatter=accessFormatter
+args=('/var/log/x2gobroker/access.log',)
+
+[formatter_accessFormatter]
+format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
+datefmt=
+
+[logger_error]
+level=DEBUG
+handlers=errorFileHandler
+qualname=error
+propagate=0
+
+[handler_errorFileHandler]
+class=FileHandler
+formatter=accessFormatter
+args=('/var/log/x2gobroker/error.log',)
+
+[formatter_errorFormatter]
+format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
+datefmt=
diff --git a/x2gobroker/defaults.py b/x2gobroker/defaults.py
index 48b61d8..b85a296 100644
--- a/x2gobroker/defaults.py
+++ b/x2gobroker/defaults.py
@@ -31,6 +31,11 @@ if os.environ.has_key('X2GOBROKER_CONFIG'):
else:
X2GOBROKER_CONFIG="/etc/x2go/x2gobroker.conf"
+if os.environ.has_key('X2GOBROKER_LOGCONFIG'):
+ X2GOBROKER_LOGCONFIG=os.environ['X2GOBROKER_LOGCONFIG']
+else:
+ X2GOBROKER_LOGCONFIG="/etc/x2go/broker/x2gobroker-loggers.conf"
+
if os.environ.has_key('X2GOBROKER_SESSIONPROFILES'):
X2GOBROKER_SESSIONPROFILES=os.environ['X2GOBROKER_SESSIONPROFILES']
else:
diff --git a/x2gobroker/brokers/ldap_broker.py b/x2gobroker/loggers.py
similarity index 68%
copy from x2gobroker/brokers/ldap_broker.py
copy to x2gobroker/loggers.py
index 61857d8..4493091 100644
--- a/x2gobroker/brokers/ldap_broker.py
+++ b/x2gobroker/loggers.py
@@ -2,6 +2,7 @@
# Copyright (C) 2012 by Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de>
# Copyright (C) 2012 by Oleksandr Shneyder <oleksandr.shneyder(a)obviously-nice.de>
+# Copyright (C) 2012 by Heinz-Markus Graesing <heinz-m.graesing(a)obviously-nice.de>
#
# X2Go Session Broker is free software; you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@ -18,16 +19,17 @@
# Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-"""\
-L{ldap.X2GoBroker} class - a production X2GoBroker implementations that uses LDAP as configuration backend
+import logging
+import logging.config
-"""
-__NAME__ = 'x2gobroker-pylib'
+from x2gobroker.defaults import X2GOBROKER_LOGCONFIG as _X2GOBROKER_LOGCONFIG
-# modules
-import x2gobroker.base_broker as base
+logging.config.fileConfig(_X2GOBROKER_LOGCONFIG)
-class X2GoBroker(x2gobroker.base.X2GoBroker):
- """\
+print dir(logging.config)
+
+# create loggers
+logger_broker = logging.getLogger('broker')
+logger_access = logging.getLogger('access')
+logger_error = logging.getLogger('error')
- """
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
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 "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, build-main has been updated
via abebae8791274f6634adb39d930ae055feed5fbb (commit)
from 2ce613977c17b31475dc3207652daa00a78f2537 (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:
debian/…
[View More]python-x2gobroker.postinst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
The diff of changes is:
diff --git a/debian/python-x2gobroker.postinst b/debian/python-x2gobroker.postinst
index 861b3e0..6299aea 100755
--- a/debian/python-x2gobroker.postinst
+++ b/debian/python-x2gobroker.postinst
@@ -23,7 +23,7 @@ case "$1" in
# the python-x2gobroker needs special permissions on its log directory
if ! dpkg-statoverride --list /var/log/x2gobroker >/dev/null; then
- dpkg-statoverride --add --update x2gobroker adm 0750 /var/log/x2gobroker
+ dpkg-statoverride --add --update x2gobroker adm 2750 /var/log/x2gobroker
fi
;;
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
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 "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]