[X2Go-Commits] x2gobroker.git - master (branch) updated: 0.0.1.0-2-g19582aa

X2Go dev team git-admin at x2go.org
Fri Apr 26 00:53:14 CEST 2013


The branch, master has been updated
  discards  6999004a9fad84b2305fac1e92be7975802ba5ad (commit)
  discards  e5464f0dc50adbef2802e9f851ec82af31af7644 (commit)
  discards  b5a173b396f9c0d54a47b42a42c55f06580343a4 (commit)
  discards  4728afa79980af5529f7abfbc74d146c3e41e79d (commit)
  discards  39b86db4b2b00b42213498ea2dcb1c3bb89430c0 (commit)
  discards  f6f6b32e0a8eea06cdf1d888941e4b748ac51bb6 (commit)
  discards  1c22ef97db768e352e9b0b6ec4bb3802f2983946 (commit)
  discards  4922dbc886553349ce9f76fbebe4fee2ccc7dc63 (commit)
  discards  1e70ec048687676bd15654ff60aed29f26288d75 (commit)
  discards  692561e8fe83789863ae6a04e6e4a747f859bc03 (commit)
  discards  abc72963617a4c27b376efacbc46cfbe4de4237a (commit)
  discards  7da7e324930cf1e2265672853609746244fa374e (commit)
  discards  710f44fe7f9ff77d0896a250b2de52f2b4cc0a3a (commit)
  discards  9b780d88aafa5432de58ca2c0606fe7a0048b1bc (commit)
  discards  18a92d3014e5060b7fc959518ad822f572e89691 (commit)
  discards  112ebe4f0f5494b18ebda527d6920aa5e1440fae (commit)
  discards  041db4bb343d596e5861c54d80db45ab622cbf9d (commit)
  discards  e6a7f9f6dec729233e9aa9f1c9ea4978f06f14e0 (commit)
  discards  26d9b1918943c437fbe3e88f651c66fcb2fc7443 (commit)
  discards  1eedf8bc5e22bf396159d00c6dfd18837e29b941 (commit)
  discards  6d488f01366743827558f8cb208b687207d19de7 (commit)
  discards  77c3a2cea7defd21f3af1edc17f29095b3329ef3 (commit)
  discards  bc41924e2929edfe733ba6d9c9646bfeafa7e511 (commit)
  discards  d9edb503e4b28793fb7b7a3848d24bd6df97fa7f (commit)
  discards  27257d282bf6be8bc7d511824283725df634e045 (commit)
  discards  ace673b6219a685077cc15370395190190ba94c1 (commit)
  discards  a007b3e4f9a645c500c033cf6517542d76d6ad0b (commit)
  discards  d459b5ba3c9024cdc56f3af809f364e27ae8453d (commit)
  discards  cd4bad34085b1f22461b25d3590e93b9d77961b1 (commit)
  discards  087c7780d2eeed2810160c79da7cc3a8c62526b8 (commit)
  discards  5d0e87dc21b65c1ddbc3b9de20d6cd9424625e1e (commit)
  discards  5c84b2ac39cabc4f1ae3051fb220c7f65149d561 (commit)
  discards  8cf905c4399d9737cb613acadaa1d6f6d5683f96 (commit)
  discards  78623cec81402fea0f8e36c01fa15261cd1abba3 (commit)
  discards  3af1d8018a7df5db02d46162b08a66cb6d6ddb11 (commit)
  discards  f4ff0ae355ed058f2fdf8e2267cb3ad7812e097c (commit)
  discards  ca48248f7042f81ec2ba9d25907e0d2545007cc6 (commit)
  discards  620140e5cc38e3f84d014042f54c1235347c4923 (commit)
  discards  e4f4a3be711ee2246032b555da42151dfb232af8 (commit)
  discards  0318f27362e56d6587c82d63926cfe677eaccffd (commit)
  discards  bf9ca01cd94266ee47c6ce056a702a942803124c (commit)
  discards  d6e31e806eeb92472e1eaa2c87c3bae3f5d94dc4 (commit)
  discards  ad12802c5aa0c60a2586d5874f638ef1dd7dc8e3 (commit)
  discards  11cc12dd2fe8c0d0e171bb79e8272c7ee60528c9 (commit)
  discards  26dd0105562fbdebc0662b8f86d78a3a8d71c2fa (commit)
  discards  ca33ea93056615c370586d9f1054b29695b56393 (commit)
  discards  6089879c268eaafb9cd3bdc76dc9f06346ef592f (commit)
  discards  bff088d523cccbcbe5c6836eaf61e05bc2145df7 (commit)
  discards  1298863cc62b9167f4a270cf5262d8d234fe56b0 (commit)
  discards  48ca859f6e7950c9f08d20ac7c79feff70a65b2e (commit)
  discards  17d847151ef8803f9e973ddbe9e8b47c56d30623 (commit)
  discards  3eece58572d42b888f3f922eac9ca7f64937a2da (commit)
  discards  5a4f129a152362b5bfb133d39638274ed0c65f41 (commit)
       via  19582aa37e0e3cab202c43cd7497d791cbeee1b3 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (6999004a9fad84b2305fac1e92be7975802ba5ad)
            \
             N -- N -- N (19582aa37e0e3cab202c43cd7497d791cbeee1b3)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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:
 bin/x2gobroker-testauth                            |  123 -----------------
 debian/changelog                                   |   45 +------
 debian/control                                     |  108 +++++++--------
 debian/python-x2gobroker.install                   |    4 +-
 debian/python-x2gobroker.postinst                  |   29 ----
 debian/python-x2gobroker.postrm                    |   27 ----
 debian/python-x2gobroker.preinst                   |   31 -----
 debian/rules                                       |    8 +-
 debian/x2gobroker-agent.postinst                   |   11 +-
 debian/x2gobroker-agent.postrm                     |   12 +-
 debian/x2gobroker-authservice.install              |    4 +-
 debian/x2gobroker-authservice.postinst             |   73 ----------
 debian/x2gobroker-authservice.postrm               |   51 -------
 .../x2gobroker-cgi.install                         |    0
 debian/x2gobroker-daemon.install                   |    1 -
 debian/x2gobroker-daemon.postinst                  |   14 +-
 debian/x2gobroker-daemon.postrm                    |    9 +-
 debian/x2gobroker-wsgi.install                     |    3 -
 debian/x2gobroker-wsgi.links                       |    2 -
 debian/x2gobroker-wsgi.postinst                    |   79 -----------
 debian/x2gobroker-wsgi.postrm                      |   51 -------
 debian/x2gobroker.install                          |    3 +-
 debian/x2gobroker.manpages                         |    1 -
 etc/broker/x2gobroker-authservice-logger.conf      |   53 --------
 etc/broker/x2gobroker-loggers.conf                 |   21 ++-
 etc/broker/x2gobroker-sessionprofiles.conf         |    4 +-
 etc/x2gobroker-wsgi.apache.conf                    |   44 ------
 etc/x2gobroker-wsgi.apache.vhost                   |   75 -----------
 etc/x2gobroker.conf                                |    3 +
 logrotate/{x2gobroker-wsgi => x2gobroker}          |    4 +-
 logrotate/x2gobroker-authservice                   |   13 --
 logrotate/x2gobroker-daemon                        |   13 --
 man/man8/x2gobroker-testauth.8                     |   64 ---------
 man/man8/x2gobroker.8                              |    2 +-
 sbin/x2gobroker                                    |   29 +---
 sbin/x2gobroker-authservice                        |  121 ++---------------
 sbin/x2gobroker-pubkeyauthorizer                   |   38 ++++--
 x2gobroker/__init__.py                             |   11 +-
 x2gobroker/agent.py                                |    5 +-
 x2gobroker/authmechs/pam_authmech.py               |    2 -
 x2gobroker/authservice.py                          |   73 ++++++++--
 x2gobroker/brokers/base_broker.py                  |   21 +--
 x2gobroker/brokers/zeroconf_broker.py              |    7 +-
 x2gobroker/defaults.py                             |    9 +-
 x2gobroker/loggers.py                              |    5 +
 x2gobroker/tests/test_broker_base.py               |    4 +-
 x2gobroker/tests/test_broker_inifile.py            |  142 ++++----------------
 x2gobroker/tests/test_broker_zeroconf.py           |    2 -
 x2gobroker/tests/test_web_plain_zeroconf.py        |    9 +-
 x2gobroker/web/extras.py                           |    5 +-
 x2gobroker/web/html.py                             |   13 +-
 x2gobroker/web/plain.py                            |   16 +--
 x2gobroker/x2gobroker_exceptions.py                |   28 ----
 53 files changed, 282 insertions(+), 1243 deletions(-)
 delete mode 100755 bin/x2gobroker-testauth
 delete mode 100755 debian/python-x2gobroker.postinst
 delete mode 100755 debian/python-x2gobroker.postrm
 delete mode 100755 debian/python-x2gobroker.preinst
 delete mode 100755 debian/x2gobroker-authservice.postinst
 delete mode 100755 debian/x2gobroker-authservice.postrm
 rename x2gobroker/tests/test_uccsjson.py => debian/x2gobroker-cgi.install (100%)
 delete mode 100644 debian/x2gobroker-daemon.install
 delete mode 100644 debian/x2gobroker-wsgi.install
 delete mode 100644 debian/x2gobroker-wsgi.links
 delete mode 100755 debian/x2gobroker-wsgi.postinst
 delete mode 100755 debian/x2gobroker-wsgi.postrm
 delete mode 100644 etc/broker/x2gobroker-authservice-logger.conf
 delete mode 100644 etc/x2gobroker-wsgi.apache.conf
 delete mode 100644 etc/x2gobroker-wsgi.apache.vhost
 rename logrotate/{x2gobroker-wsgi => x2gobroker} (57%)
 delete mode 100644 logrotate/x2gobroker-authservice
 delete mode 100644 logrotate/x2gobroker-daemon
 delete mode 100644 man/man8/x2gobroker-testauth.8
 delete mode 100644 x2gobroker/x2gobroker_exceptions.py

The diff of changes is:
diff --git a/bin/x2gobroker-testauth b/bin/x2gobroker-testauth
deleted file mode 100755
index d8ef295..0000000
--- a/bin/x2gobroker-testauth
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/usr/bin/env python
-
-# This file is part of the  X2Go Project - http://www.x2go.org
-# Copyright (C) 2011-2012 by Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
-# Copyright (C) 2011-2012 by Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
-# Copyright (C) 2012 by Mike Gabriel <mike.gabriel at 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.
-
-import os
-import sys
-import setproctitle
-import argparse
-import logging
-
-# perform an authentication against the authentication mechanism configured for WSGI
-try:
-    import x2gobroker.defaults
-except ImportError:
-    sys.path.insert(0, os.path.join(os.getcwd(), '..'))
-    import x2gobroker.defaults
-import x2gobroker.loggers
-
-PROG_NAME = os.path.basename(sys.argv[0])
-PROG_OPTIONS = sys.argv[1:]
-try:
-    _password_index = PROG_OPTIONS.index('--password')+1
-    PROG_OPTIONS[_password_index] = "XXXXXXXX"
-except ValueError:
-    # ignore if --password option is not specified
-    pass
-setproctitle.setproctitle("%s %s" % (PROG_NAME, " ".join(PROG_OPTIONS)))
-
-if __name__ == "__main__":
-
-    auth_options = [
-        {'args':['-u','--username', '--user'], 'default': None, 'metavar': 'USERNAME', 'help': 'Test authentication for the account with this username', },
-        {'args':['-p', '--password'], 'default': None, 'metavar': 'PASSWORD', 'help': 'Test authentication using this password', },
-    ]
-    misc_options = [
-        {'args':['-C','--config-file'], 'default': None, 'metavar': 'CONFIG_FILE', 'help': 'Specify a special configuration file name, default is: {default}'.format(default=x2gobroker.defaults.X2GOBROKER_CONFIG), },
-        {'args':['-b','--backend'], 'default': 'zeroconf', 'metavar': 'BACKEND', 'help': 'Use this specific backend for testing authentication, see x2gobroker.conf for a list of configured and enabled backends', },
-        {'args':['-d','--debug'], 'default': False, 'action': 'store_true', 'help': 'enable debugging code', },
-    ]
-    p = argparse.ArgumentParser(description='X2Go Session Broker (Authentication Test Utility)',\
-                                epilog="WARNING: Using this utility from the command line is not recommended!!!\nYour credentials will get revealed in your shells history file.",\
-                                formatter_class=argparse.RawDescriptionHelpFormatter, \
-                                add_help=True, argument_default=None)
-    p_auth = p.add_argument_group('authentication parameters')
-    p_misc = p.add_argument_group('miscellaneous parameters')
-
-    for (p_group, opts) in ( (p_auth, auth_options), (p_misc, misc_options), ):
-        for opt in opts:
-            args = opt['args']
-            del opt['args']
-            p_group.add_argument(*args, **opt)
-
-    cmdline_args = p.parse_args()
-
-    if cmdline_args.username is None or cmdline_args.password is None:
-        p.print_help()
-        print
-        print "*** Cannot continue without username and password... ***"
-        print
-        sys.exit(-1)
-
-    if cmdline_args.config_file is not None:
-        x2gobroker.defaults.X2GOBROKER_CONFIG = cmdline_args.config_file
-
-    if cmdline_args.debug:
-        x2gobroker.defaults.X2GOBROKER_DEBUG = cmdline_args.debug
-        # raise log level to DEBUG if requested...
-        if x2gobroker.defaults.X2GOBROKER_DEBUG and not x2gobroker.defaults.X2GOBROKER_TESTSUITE:
-            x2gobroker.loggers.logger_broker.setLevel(logging.DEBUG)
-            x2gobroker.loggers.logger_error.setLevel(logging.DEBUG)
-
-    username = cmdline_args.username
-    password = cmdline_args.password
-
-config_file = x2gobroker.defaults.X2GOBROKER_CONFIG
-config_defaults = x2gobroker.defaults.X2GOBROKER_CONFIG_DEFAULTS
-
-try:
-    exec("import x2gobroker.brokers.{backend}_broker as _backend".format(backend=cmdline_args.backend))
-except ImportError:
-        p.print_help()
-        print
-        print "*** No such backend: {backend} ***".format(backend=cmdline_args.backend)
-        print
-        sys.exit(-2)
-
-broker = _backend.X2GoBroker(config_file=config_file, config_defaults=config_defaults)
-if not broker.is_enabled():
-        p.print_help()
-        print
-        print "*** Backend not enabled: {backend} ***".format(backend=cmdline_args.backend)
-        print
-        sys.exit(-3)
-
-def check_password(username, password):
-    return broker._do_authenticate(username=username, password=password)
-
-if __name__ == "__main__":
-
-    if check_password(username, password):
-        print "authentication succeeded"
-        sys.exit(0)
-    else:
-        print "authentication failed"
-        sys.exit(-1)
diff --git a/debian/changelog b/debian/changelog
index c0ab3f0..b460d0d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,42 +1,9 @@
-x2gobroker (0.0.1.2-0~x2go1) UNRELEASED; urgency=low
-
-  * Continue development...
-
- -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Tue, 23 Apr 2013 23:26:21 +0200
-
-x2gobroker (0.0.1.1-0~x2go1) unstable; urgency=low
-
-  * New upstream version (0.0.1.1):
-    - Add WSGI support to X2Go Session Broker. Allows plugging into
-      Apache2 by using the mod_wsgi module.
-    - Add Apache2 configuration for WSGI support that shows how to
-      setup a VirtualHost for X2Go Session Broker.
-    - For sessions profiles with autologin enable, add a dummy key
-      session profile parameter that triggers key based auth in X2Go Client.
-      (Fixes: #154).
-    - Fix hard-coded path to x2gobroker's authservice socket.
-    - Separate logging logic of x2gobroker-authservice from the rest of
-      the logging in x2gobroker. (Fixes: #172).
-    - x2gobroker-pubkeyauthorizer: no logging-to-file support anymore.
-      (Fixes: #175).
-    - Fix name of get() method for /pubkeys/ URL path. (Fixes: #176).
-    - Move AuthService server code fully into x2gobroker-authservice
-      daemon script.
-    - Add forgotten file: x2gobroker-authservice-logger.conf. (Fixes: #180).
-    - Add script: x2gobroker-testauth.
-    - Add enable()/disable() methods to broker backends.
-    - Move complete authservice logic into x2gobroker-authservice script.
-    - Add command and directrdp session profile parameters to defaults.
-    - Fix wrong usage of session option »cmd«, has to be »command«.
-  * /debian/control:
-    + Fix --root parameter in DEB_PYTHON_INSTALL_ARGS.
-    + Let bin:package x2gobroker-authservice depend on python-x2gobroker (of the
-      same version). (Fixes: #170).
-  * Properly remove the X2Go Session broker log files on package purgal.
-  * Let bin:package x2gobroker-authservice create x2gouser:x2gouser, as well.
-    (Fixes: #171).
-
- -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Tue, 23 Apr 2013 21:38:07 +0200
+x2gobroker (0.0.1.1-0~x2go1) UNRELEASED; urgency=low
+
+  * New upstream version (0.0.1.0):
+    - Continue development...
+
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Sun, 10 Mar 2013 13:00:32 +0100
 
 x2gobroker (0.0.1.0-0~x2go1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index cfe63c6..eb7187c 100644
--- a/debian/control
+++ b/debian/control
@@ -1,5 +1,5 @@
 Source: x2gobroker
-Section: misc
+Section: python
 Priority: optional
 Maintainer: X2Go Developers <x2go-dev at lists.berlios.de>
 Uploaders:
@@ -13,52 +13,18 @@ Build-Depends:
  python-setuptools,
  python-nose,
  python-paste,
-Standards-Version: 3.9.4
-
-Package: python-x2gobroker
-Section: python
-Architecture: all
-Depends:
- ${python:Depends},
- ${misc:Depends},
- python,
- python-pampy,
- python-netaddr,
- python-tornado,
- python-paramiko,
-Description: X2Go http(s) based session broker (Python modules)
- X2Go is a server based computing environment with
-    - session resuming
-    - low bandwidth support
-    - LDAP support
-    - client side mass storage mounting support
-    - client side printing support
-    - audio support
-    - authentication by smartcard and USB stick
- .
- The session broker is a server tool for X2Go that
- tells your X2Go Client application in a terminal
- server cluster what servers and session types are
- most appropriate for the user in front of the
- X2Go terminal.
- .
- A session broker is most useful in load balanced
- X2Go server farms.
- .
- This package contains common files needed by all X2Go session
- brokers being package for this distribution.
-XS-Python-Version: >= 2.6
+Standards-Version: 3.9.3
+XS-Python-Version: >= 2.4
 
 Package: x2gobroker
 Architecture: all
 Depends:
- ${python:Depends},
  ${misc:Depends},
+ ${python:Depends},
  python,
  python-argparse,
  python-setproctitle,
  python-tornado,
- python-wsgilog,
  python-x2gobroker (>= ${source:Version}), python-x2gobroker (<< ${source:Version}.1~),
 Suggests:
  apache2 | httpd,
@@ -86,16 +52,13 @@ Description: X2Go http(s) based session broker (executable)
 Package: x2gobroker-authservice
 Architecture: all
 Depends:
- ${python:Depends},
- ${misc:Depends},
- adduser,
  python,
  python-argparse,
  python-setproctitle,
- python-pampy,
- python-x2gobroker (>= ${source:Version}), python-x2gobroker (<< ${source:Version}.1~),
+ ${misc:Depends},
+ ${python:Depends},
 Suggests:
- x2gobroker-daemon,
+ apache2 | httpd,
 Description: X2Go http(s) based session broker (PAM authentication service)
  X2Go is a server based computing environment with
     - session resuming
@@ -122,10 +85,13 @@ Package: x2gobroker-daemon
 Architecture: all
 Depends:
  ${misc:Depends},
+ ${python:Depends},
  adduser,
  x2gobroker (>= ${source:Version}), x2gobroker (<< ${source:Version}.1~),
 Recommends:
  x2gobroker-authservice,
+Suggests:
+ apache2 | httpd,
 Description: X2Go http(s) based session broker (daemon)
  X2Go is a server based computing environment with
     - session resuming
@@ -149,17 +115,48 @@ Description: X2Go http(s) based session broker (daemon)
  installs the X2Go Session Broker as standalone
  daemon.
 
-Package: x2gobroker-wsgi
+#Package: x2gobroker-cgi
+#Architecture: all
+#Depends:
+# ${misc:Depends},
+# ${python:Depends},
+#Suggests:
+# apache2 | httpd,
+#Description: X2Go http(s) based session broker (CGI)
+# X2Go is a server based computing environment with
+#    - session resuming
+#    - low bandwidth support
+#    - LDAP support
+#    - client side mass storage mounting support
+#    - client side printing support
+#    - audio support
+#    - authentication by smartcard and USB stick
+# .
+# The session broker is a server tool for X2Go that
+# tells your X2Go Client application in a terminal
+# server cluster what servers and session types are
+# most appropriate for the user in front of the
+# X2Go terminal.
+# .
+# A session broker is most useful in load balanced
+# X2Go server farms.
+# .
+# This package contains a configuration that installs
+# the X2Go Session Broker as a CGI script so it
+# can be run from within an existing httpd server.
+
+Package: python-x2gobroker
 Architecture: all
 Depends:
  ${misc:Depends},
  ${python:Depends},
- python,
- adduser,
- x2gobroker (>= ${source:Version}), x2gobroker (<< ${source:Version}.1~),
+ python-pampy,
+ python-netaddr,
+ python-tornado,
+ python-paramiko,
 Suggests:
- apache2,
-Description: X2Go http(s) based session broker (CGI)
+ apache2 | httpd,
+Description: X2Go http(s) based session broker (Python modules)
  X2Go is a server based computing environment with
     - session resuming
     - low bandwidth support
@@ -178,21 +175,16 @@ Description: X2Go http(s) based session broker (CGI)
  A session broker is most useful in load balanced
  X2Go server farms.
  .
- This package contains an Apache2 configuration that
- installs the X2Go Session Broker as a WSGI application
- into a running Apache2 httpd.
+ This package contains common files needed by all X2Go session
+ brokers being package for this distribution.
 
 Package: x2gobroker-agent
 Architecture: any
 Depends:
  ${shlibs:Depends},
- ${python:Depends},
  ${misc:Depends},
- python,
- python-setproctitle,
- python-argparse,
- python-paramiko,
  perl,
+ python,
  adduser,
  x2goserver,
 Description: X2Go http(s) based session broker (common files)
diff --git a/debian/python-x2gobroker.install b/debian/python-x2gobroker.install
index edbea88..91aabf6 100644
--- a/debian/python-x2gobroker.install
+++ b/debian/python-x2gobroker.install
@@ -1,5 +1,5 @@
 etc/x2gobroker.conf etc/x2go/
-etc/broker/x2gobroker-sessionprofiles.conf etc/x2go/broker/
-etc/broker/x2gobroker-loggers.conf etc/x2go/broker/
+etc/broker etc/x2go/
+logrotate/x2gobroker etc/logrotate.d/
 pam/x2gobroker etc/pam.d/
 usr/
diff --git a/debian/python-x2gobroker.postinst b/debian/python-x2gobroker.postinst
deleted file mode 100755
index 5829481..0000000
--- a/debian/python-x2gobroker.postinst
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-# postinst script for python-x2gobroker
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
-	dpkg-maintscript-helper rm_conffile /etc/logrotate.d/x2gobroker 0.0.1.1-0 -- "$@"
-fi
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/python-x2gobroker.postrm b/debian/python-x2gobroker.postrm
deleted file mode 100755
index d8e6815..0000000
--- a/debian/python-x2gobroker.postrm
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh
-# postrm script for python-x2gobroker
-#
-# see: dh_installdeb(1)
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see /usr/share/doc/packaging-manual/
-
-set -e
-
-if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
-	dpkg-maintscript-helper rm_conffile /etc/logrotate.d/x2gobroker 0.0.1.1-0 -- "$@"
-fi
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
\ No newline at end of file
diff --git a/debian/python-x2gobroker.preinst b/debian/python-x2gobroker.preinst
deleted file mode 100755
index 1f28dd6..0000000
--- a/debian/python-x2gobroker.preinst
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-# preinst script for python-x2gobroker
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
-	dpkg-maintscript-helper rm_conffile /etc/logrotate.d/x2gobroker 0.0.1.1-0 -- "$@"
-fi
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-
-
diff --git a/debian/rules b/debian/rules
index 321f0cc..28be4dc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,12 +22,12 @@
 #export DEB_CFLAGS_MAINT_APPEND = -Wall
 #include /usr/share/dpkg/buildflags.mk
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-
 DEB_PYTHON_SYSTEM = $(shell test -f /usr/bin/dh_python2 && echo "" || echo "pysupport")
-DEB_PYTHON_INSTALL_ARGS_python-x2gobroker ?= --root=$(DEB_DESTDIR) --prefix=$(DEB_PYTHON_PREFIX_ARG) --no-compile -O0 --install-layout=deb
-include /usr/share/cdbs/1/class/python-distutils.mk
+DEB_PYTHON_INSTALL_ARGS_ALL = --install-layout=deb --single-version-externally-managed
+
+include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/makefile.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
 
 # needed when building with pysupport (e.g. on Ubuntu lucid)
 common-binary-indep::
diff --git a/debian/x2gobroker-agent.postinst b/debian/x2gobroker-agent.postinst
index a6fd79d..a9c761b 100755
--- a/debian/x2gobroker-agent.postinst
+++ b/debian/x2gobroker-agent.postinst
@@ -38,27 +38,22 @@ case "$1" in
 			        --shell /bin/bash --group --home /var/lib/x2gobroker x2gobroker
 		else
 			echo "User x2gobroker already exists." 1>&2
-
-			# make sure the home directory exists belongs to x2gobroker:x2gobroker
-			mkdir -p /var/lib/x2gobroker
-			chown x2gobroker:x2gobroker /var/lib/x2gobroker -f
-
 			# make sure all settings are appropriate
 			if getent passwd x2gobroker | grep /dev/null 1>/dev/null 2>/dev/null; then
+				mkdir -p /var/lib/x2gobroker
 				usermod --home /var/lib/x2gobroker x2gobroker
 			fi
 			if getent passwd x2gobroker | grep /bin/false 1>/dev/null 2>/dev/null; then
 				usermod --shell /bin/bash x2gobroker
 			fi
+			# make sure the home directory belongs to x2gouser:x2gouser
+			chown x2gobroker:x2gobroker /var/lib/x2gobroker -Rf
 		fi
 
 		# the x2gobroker-agent has to be installed setuid root
 		if ! dpkg-statoverride --list /usr/lib/x2go/x2gobroker-agent 1>/dev/null; then
 		    dpkg-statoverride --add --update root x2gobroker 4750 /usr/lib/x2go/x2gobroker-agent
 		fi
-		touch /var/log/x2gobroker/broker.log && chown x2gobroker:adm /var/log/x2gobroker/broker.log
-		touch /var/log/x2gobroker/error.log && chown x2gobroker:adm /var/log/x2gobroker/error.log
-
 
 		;;
 
diff --git a/debian/x2gobroker-agent.postrm b/debian/x2gobroker-agent.postrm
index f5c6be0..bc535ee 100755
--- a/debian/x2gobroker-agent.postrm
+++ b/debian/x2gobroker-agent.postrm
@@ -18,24 +18,16 @@ set -e
 
 case "$1" in
 	purge)
-
 		if dpkg-statoverride --list /usr/lib/x2go/x2gobroker-agent 1>/dev/null; then
 			dpkg-statoverride --remove /usr/lib/x2go/x2gobroker-agent
 		fi
 
-		if [ ! -d /usr/share/doc/x2gobroker-daemon ] && [ ! -d /usr/share/doc/x2gobroker-authservice ] && [ ! -d /usr/share/doc/x2gobroker-wsgi ]; then
-			if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
-				dpkg-statoverride --remove /var/log/x2gobroker
-			fi
-			rm -Rf /var/log/x2gobroker
-		fi
-
-		if [ ! -d /usr/share/doc/x2gobroker-daemon ] && [ ! -d /usr/share/doc/x2gobroker-authservice ] && [ ! -d /usr/share/doc/x2gobroker-wsgi ]; then
+		if [ ! -d /usr/share/doc/x2gobroker-daemon ]; then
 			# remove user/group x2gobroker from system (if not in use by x2gobroker-daemon
 			getent passwd x2gobroker 1>/dev/null && deluser x2gobroker
 			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
 			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
-			rm -Rf /var/lib/x2gobroker
+			rm -Rfv /var/lib/x2gobroker
 		fi
 
 		;;
diff --git a/debian/x2gobroker-authservice.install b/debian/x2gobroker-authservice.install
index 00e5a97..03fb37c 100644
--- a/debian/x2gobroker-authservice.install
+++ b/debian/x2gobroker-authservice.install
@@ -1,3 +1 @@
-sbin/x2gobroker-authservice usr/sbin/
-logrotate/x2gobroker-authservice etc/logrotate.d/
-etc/broker/x2gobroker-authservice-logger.conf etc/x2go/broker
\ No newline at end of file
+sbin/x2gobroker-authservice usr/sbin/
\ No newline at end of file
diff --git a/debian/x2gobroker-authservice.postinst b/debian/x2gobroker-authservice.postinst
deleted file mode 100755
index 52be4f9..0000000
--- a/debian/x2gobroker-authservice.postinst
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-# postinst script for x2gobroker-authservice
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-	configure)
-
-		# setup user/group x2gobroker
-		if ! getent group x2gobroker 1>/dev/null; then
-			echo "Creating x2gobroker group." 1>&2
-			addgroup --system x2gobroker
-		else
-			echo "Group x2gobroker already exists." 1>&2
-		fi
-		if ! getent passwd x2gobroker 1>/dev/null; then
-			echo "Creating x2gobroker user." 1>&2
-			adduser --system \
-			        --disabled-password --disabled-login \
-			        --shell /bin/bash --group --home /var/lib/x2gobroker x2gobroker
-		else
-			echo "User x2gobroker already exists." 1>&2
-
-			# make sure the home directory exists belongs to x2gobroker:x2gobroker
-			mkdir -p /var/lib/x2gobroker
-			chown x2gobroker:x2gobroker /var/lib/x2gobroker -f
-
-			# make sure all settings are appropriate
-			if getent passwd x2gobroker | grep /dev/null 1>/dev/null 2>/dev/null; then
-				usermod --home /var/lib/x2gobroker x2gobroker
-			fi
-			if getent passwd x2gobroker | grep /bin/false 1>/dev/null 2>/dev/null; then
-				usermod --shell /bin/bash x2gobroker
-			fi
-		fi
-
-		# the x2gobroker-daemon needs special permissions on its log directory
-		if ! dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
-			dpkg-statoverride --add --update x2gobroker adm 2750 /var/log/x2gobroker
-		fi
-
-		;;
-
-	abort-upgrade|abort-remove|abort-deconfigure)
-		;;
-
-	*)
-		echo "postinst called with unknown argument \`$1'" 1>&2
-		exit 1
-		;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/x2gobroker-authservice.postrm b/debian/x2gobroker-authservice.postrm
deleted file mode 100755
index bf336f5..0000000
--- a/debian/x2gobroker-authservice.postrm
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /bin/sh
-# postrm script for x2gobroker-authservice
-#
-# see: dh_installdeb(1)
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see /usr/share/doc/packaging-manual/
-
-set -e
-
-
-case "$1" in
-	purge)
-
-		if [ ! -d /usr/share/doc/x2gobroker-daemon ] && [ ! -d /usr/share/doc/x2gobroker-wsgi ] && [ ! -d /usr/share/doc/x2gobroker-agent ] ; then
-			if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
-				dpkg-statoverride --remove /var/log/x2gobroker
-			fi
-			rm -Rf /var/log/x2gobroker
-		fi
-
-		if [ ! -d /usr/share/doc/x2gobroker-daemon ] && [ ! -d /usr/share/doc/x2gobroker-agent ] && [ ! -d /usr/share/doc/x2gobroker-wsgi ]; then
-			# remove user/group x2gobroker from system (only if not in use by x2gobroker-agent
-			getent passwd x2gobroker 1>/dev/null && deluser x2gobroker
-			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
-			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
-			rm -Rf /var/lib/x2gobroker
-		fi
-
-		;;
-	remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-		;;
-	*)
-		echo "postrm called with unknown argument \`$1'" 1>&2
-		exit 0
-		;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/x2gobroker/tests/test_uccsjson.py b/debian/x2gobroker-cgi.install
similarity index 100%
rename from x2gobroker/tests/test_uccsjson.py
rename to debian/x2gobroker-cgi.install
diff --git a/debian/x2gobroker-daemon.install b/debian/x2gobroker-daemon.install
deleted file mode 100644
index 7f70476..0000000
--- a/debian/x2gobroker-daemon.install
+++ /dev/null
@@ -1 +0,0 @@
-logrotate/x2gobroker-daemon etc/logrotate.d/
\ No newline at end of file
diff --git a/debian/x2gobroker-daemon.postinst b/debian/x2gobroker-daemon.postinst
index 95c4475..cc5fb54 100755
--- a/debian/x2gobroker-daemon.postinst
+++ b/debian/x2gobroker-daemon.postinst
@@ -5,6 +5,9 @@
 
 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>
@@ -35,27 +38,22 @@ case "$1" in
 			        --shell /bin/bash --group --home /var/lib/x2gobroker x2gobroker
 		else
 			echo "User x2gobroker already exists." 1>&2
-
-			# make sure the home directory exists belongs to x2gobroker:x2gobroker
-			mkdir -p /var/lib/x2gobroker
-			chown x2gobroker:x2gobroker /var/lib/x2gobroker -f
-
 			# make sure all settings are appropriate
 			if getent passwd x2gobroker | grep /dev/null 1>/dev/null 2>/dev/null; then
+				mkdir -p /var/lib/x2gobroker
 				usermod --home /var/lib/x2gobroker x2gobroker
 			fi
 			if getent passwd x2gobroker | grep /bin/false 1>/dev/null 2>/dev/null; then
 				usermod --shell /bin/bash x2gobroker
 			fi
+			# make sure the home directory belongs to x2gouser:x2gouser
+			chown x2gobroker:x2gobroker /var/lib/x2gobroker -Rf
 		fi
 
 		# the x2gobroker-daemon needs special permissions on its log directory
 		if ! dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
 			dpkg-statoverride --add --update x2gobroker adm 2750 /var/log/x2gobroker
 		fi
-		touch /var/log/x2gobroker/access.log && chown x2gobroker:adm /var/log/x2gobroker/access.log
-		touch /var/log/x2gobroker/broker.log && chown x2gobroker:adm /var/log/x2gobroker/broker.log
-		touch /var/log/x2gobroker/error.log && chown x2gobroker:adm /var/log/x2gobroker/error.log
 
 		;;
 
diff --git a/debian/x2gobroker-daemon.postrm b/debian/x2gobroker-daemon.postrm
index f4d0af9..34a8687 100755
--- a/debian/x2gobroker-daemon.postrm
+++ b/debian/x2gobroker-daemon.postrm
@@ -19,14 +19,11 @@ set -e
 case "$1" in
 	purge)
 
-		if [ ! -d /usr/share/doc/x2gobroker-agent ] && [ ! -d /usr/share/doc/x2gobroker-authservice ] && [ ! -d /usr/share/doc/x2gobroker-wsgi ]; then
-			if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
-				dpkg-statoverride --remove /var/log/x2gobroker
-			fi
-			rm -Rf /var/log/x2gobroker
+		if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
+			dpkg-statoverride --remove /var/log/x2gobroker
 		fi
 
-		if [ ! -d /usr/share/doc/x2gobroker-agent ] && [ ! -d /usr/share/doc/x2gobroker-authservice ] && [ ! -d /usr/share/doc/x2gobroker-wsgi ]; then
+		if [ ! -d /usr/share/doc/x2gobroker-agent ]; then
 			# remove user/group x2gobroker from system (only if not in use by x2gobroker-agent
 			getent passwd x2gobroker 1>/dev/null && deluser x2gobroker
 			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
diff --git a/debian/x2gobroker-wsgi.install b/debian/x2gobroker-wsgi.install
deleted file mode 100644
index f7f6452..0000000
--- a/debian/x2gobroker-wsgi.install
+++ /dev/null
@@ -1,3 +0,0 @@
-etc/x2gobroker-wsgi.apache.conf /etc/x2go/
-etc/x2gobroker-wsgi.apache.vhost /etc/x2go/
-logrotate/x2gobroker-wsgi etc/logrotate.d/
\ No newline at end of file
diff --git a/debian/x2gobroker-wsgi.links b/debian/x2gobroker-wsgi.links
deleted file mode 100644
index e1659e5..0000000
--- a/debian/x2gobroker-wsgi.links
+++ /dev/null
@@ -1,2 +0,0 @@
-/etc/x2go/x2gobroker-wsgi.apache.conf /etc/apache2/conf.d/x2gobroker-wsgi
-/etc/x2go/x2gobroker-wsgi.apache.vhost /etc/apache2/sites-available/x2gobroker
diff --git a/debian/x2gobroker-wsgi.postinst b/debian/x2gobroker-wsgi.postinst
deleted file mode 100755
index 0372383..0000000
--- a/debian/x2gobroker-wsgi.postinst
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-# postinst script for x2gobroker-daemon
-#
-# 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>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-	configure)
-
-		# setup user/group x2gobroker
-		if ! getent group x2gobroker 1>/dev/null; then
-			echo "Creating x2gobroker group." 1>&2
-			addgroup --system x2gobroker
-		else
-			echo "Group x2gobroker already exists." 1>&2
-		fi
-		if ! getent passwd x2gobroker 1>/dev/null; then
-			echo "Creating x2gobroker user." 1>&2
-			adduser --system \
-			        --disabled-password --disabled-login \
-			        --shell /bin/bash --group --home /var/lib/x2gobroker x2gobroker
-		else
-			echo "User x2gobroker already exists." 1>&2
-
-			# make sure the home directory exists belongs to x2gobroker:x2gobroker
-			mkdir -p /var/lib/x2gobroker
-			chown x2gobroker:x2gobroker /var/lib/x2gobroker -f
-
-			# make sure all settings are appropriate
-			if getent passwd x2gobroker | grep /dev/null 1>/dev/null 2>/dev/null; then
-				usermod --home /var/lib/x2gobroker x2gobroker
-			fi
-			if getent passwd x2gobroker | grep /bin/false 1>/dev/null 2>/dev/null; then
-				usermod --shell /bin/bash x2gobroker
-			fi
-		fi
-
-		# the x2gobroker-daemon needs special permissions on its log directory
-		if ! dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
-			dpkg-statoverride --add --update x2gobroker adm 2750 /var/log/x2gobroker
-		fi
-		touch /var/log/x2gobroker/broker.log && chown x2gobroker:adm /var/log/x2gobroker/broker.log
-		touch /var/log/x2gobroker/error.log && chown x2gobroker:adm /var/log/x2gobroker/error.log
-		touch /var/log/x2gobroker/wsgi.log && chown x2gobroker:adm /var/log/x2gobroker/wsgi.log
-
-		;;
-
-	abort-upgrade|abort-remove|abort-deconfigure)
-		;;
-
-	*)
-		echo "postinst called with unknown argument \`$1'" 1>&2
-		exit 1
-		;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/x2gobroker-wsgi.postrm b/debian/x2gobroker-wsgi.postrm
deleted file mode 100755
index 9db9cfe..0000000
--- a/debian/x2gobroker-wsgi.postrm
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /bin/sh
-# postrm script for x2gobroker-daemon
-#
-# see: dh_installdeb(1)
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see /usr/share/doc/packaging-manual/
-
-set -e
-
-
-case "$1" in
-	purge)
-
-		if [ ! -d /usr/share/doc/x2gobroker-agent ] && [ ! -d /usr/share/doc/x2gobroker-authservice ] && [ ! -d /usr/share/doc/x2gobroker-daemon ]; then
-			if dpkg-statoverride --list /var/log/x2gobroker 1>/dev/null; then
-				dpkg-statoverride --remove /var/log/x2gobroker
-			fi
-			rm -Rf /var/log/x2gobroker
-		fi
-
-		if [ ! -d /usr/share/doc/x2gobroker-agent ] && [ ! -d /usr/share/doc/x2gobroker-authservice ] && [ ! -d /usr/share/doc/x2gobroker-daemon ]; then
-			# remove user/group x2gobroker from system (only if not in use by x2gobroker-agent
-			getent passwd x2gobroker 1>/dev/null && deluser x2gobroker
-			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
-			getent group x2gobroker 1>/dev/null && delgroup x2gobroker
-			rm -Rf /var/lib/x2gobroker
-		fi
-
-		;;
-	remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-		;;
-	*)
-		echo "postrm called with unknown argument \`$1'" 1>&2
-		exit 0
-		;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/x2gobroker.install b/debian/x2gobroker.install
index adad505..693dad3 100644
--- a/debian/x2gobroker.install
+++ b/debian/x2gobroker.install
@@ -1,3 +1,2 @@
-bin/x2gobroker-testauth usr/bin/
 sbin/x2gobroker usr/sbin/
-sbin/x2gobroker-keygen usr/sbin/
+sbin/x2gobroker-keygen usr/sbin/
\ No newline at end of file
diff --git a/debian/x2gobroker.manpages b/debian/x2gobroker.manpages
index 71c3e08..569dc33 100644
--- a/debian/x2gobroker.manpages
+++ b/debian/x2gobroker.manpages
@@ -1,3 +1,2 @@
 man/man8/x2gobroker.8
 man/man8/x2gobroker-keygen.8
-man/man8/x2gobroker-testauth.8
diff --git a/etc/broker/x2gobroker-authservice-logger.conf b/etc/broker/x2gobroker-authservice-logger.conf
deleted file mode 100644
index 9c3e0c9..0000000
--- a/etc/broker/x2gobroker-authservice-logger.conf
+++ /dev/null
@@ -1,53 +0,0 @@
-# This file is part of the  X2Go Project - http://www.x2go.org
-# Copyright (C) 2011-2012 by Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
-# Copyright (C) 2011-2012 by Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
-# Copyright (C) 2012 by Mike Gabriel <mike.gabriel at 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.
-
-# WARNING: only modify this file if you _exactly_ know what you are doing!!!
-
-[loggers]
-keys=root,authservice
-
-[logger_root]
-level=NOTSET
-handlers=stderrHandler
-
-[handlers]
-keys=stderrHandler,authserviceFileHandler
-
-[formatters]
-keys=authserviceFormatter
-
-[handler_stderrHandler]
-class=StreamHandler
-args=(sys.stderr,)
-
-[logger_authservice]
-level=DEBUG
-handlers=authserviceFileHandler
-qualname=authservice
-propagate=0
-
-[handler_authserviceFileHandler]
-class=FileHandler
-formatter=authserviceFormatter
-args=('/var/log/x2gobroker/authservice.log',)
-
-[formatter_authserviceFormatter]
-format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
-datefmt=
diff --git a/etc/broker/x2gobroker-loggers.conf b/etc/broker/x2gobroker-loggers.conf
index e2edd23..87d7dca 100644
--- a/etc/broker/x2gobroker-loggers.conf
+++ b/etc/broker/x2gobroker-loggers.conf
@@ -21,17 +21,17 @@
 # WARNING: only modify this file if you _exactly_ know what you are doing!!!
 
 [loggers]
-keys=root,broker,access,error
+keys=root,broker,authservice,access,error
 
 [logger_root]
 level=NOTSET
 handlers=stderrHandler
 
 [handlers]
-keys=stderrHandler,brokerFileHandler,accessFileHandler,errorFileHandler
+keys=stderrHandler,brokerFileHandler,authserviceFileHandler,accessFileHandler,errorFileHandler
 
 [formatters]
-keys=brokerFormatter,accessFormatter,errorFormatter
+keys=brokerFormatter,authserviceFormatter,accessFormatter,errorFormatter
 
 [handler_stderrHandler]
 class=StreamHandler
@@ -52,6 +52,21 @@ args=('/var/log/x2gobroker/broker.log',)
 format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
 datefmt=
 
+[logger_authservice]
+level=DEBUG
+handlers=authserviceFileHandler
+qualname=authservice
+propagate=0
+
+[handler_authserviceFileHandler]
+class=FileHandler
+formatter=authserviceFormatter
+args=('/var/log/x2gobroker/authservice.log',)
+
+[formatter_authserviceFormatter]
+format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
+datefmt=
+
 [logger_access]
 level=DEBUG
 handlers=accessFileHandler
diff --git a/etc/broker/x2gobroker-sessionprofiles.conf b/etc/broker/x2gobroker-sessionprofiles.conf
index 8d060ec..dc79a6b 100644
--- a/etc/broker/x2gobroker-sessionprofiles.conf
+++ b/etc/broker/x2gobroker-sessionprofiles.conf
@@ -29,7 +29,6 @@
 
 
 [DEFAULT]
-command=TERMINAL
 defsndport=true
 useiconv=false
 iconvfrom=UTF-8
@@ -53,14 +52,13 @@ applications=TERMINAL,WWWBROWSER,MAILCLIENT,OFFICE
 multidisp=false
 sshproxyport=22
 sound=true
-rootless=true
+rootless=false
 iconvto=UTF-8
 soundtunnel=true
 dpi=96
 sshport=22
 setdpi=0
 pack=16m-jpeg
-directrdp=false
 
 ### EXAMPLES: Below you find some config examples. Adapt them to your needs or
 ### simply write your own session profiles and remove the examples below.
diff --git a/etc/x2gobroker-wsgi.apache.conf b/etc/x2gobroker-wsgi.apache.conf
deleted file mode 100644
index 63ba34a..0000000
--- a/etc/x2gobroker-wsgi.apache.conf
+++ /dev/null
@@ -1,44 +0,0 @@
-# enable debugging
-#SetEnv X2GOBROKER_DEBUG off
-
-# the default user/group that this WSGI application runs as
-#X2GOBROKER_DAEMON_USER=x2gobroker
-#X2GOBROKER_DAEMON_GROUP=x2gobroker
-WSGIDaemonProcess x2gobroker user=x2gobroker group=x2gobroker processes=5 threads=15
-WSGIPassAuthorization On
-
-# default broker backend (default: zeroconf)
-SetEnv X2GOBROKER_DEFAULT_BACKEND zeroconf
-#SetEnv X2GOBROKER_DEFAULT_BACKEND inifile
-#SetEnv X2GOBROKER_DEFAULT_BACKEND ldap
-#SetEnv X2GOBROKER_DEFAULT_BACKEND <some-other-broker-backend>
-
-# path to the X2Go Session Broker's configuration file
-#SetEnv X2GOBROKER_CONFIG /etc/x2go/x2gobroker.conf
-
-# path to the X2Go Session Broker's session profiles file (when using the inifile backend)
-#SetEnv X2GOBROKER_SESSIONPROFILES /etc/x2go/broker/x2gobroker-sessionprofiles.conf
-
-# path to the X2Go Session Broker's agent command
-#SetEnv X2GOBROKER_AGENT_CMD /usr/lib/x2go/x2gobroker-agent
-
-# authentication socket of the X2Go Broker's PAM Authentication Service
-#SetEnv X2GOBROKER_AUTHSOCKET /run/x2gobroker/x2gobroker-authservice.socket
-
-# if you have to-be-statically-served files somewhere below the broker URL
-#Alias /x2gobroker/static /some/static/path/
-
-WSGIScriptAlias /x2gobroker /usr/sbin/x2gobroker
-WSGIProcessGroup x2gobroker
-
-<Directory /usr/sbin/x2gobroker>
-    Order deny,allow
-    Deny from all
-
-    # grant explicit access below
-    Allow from localhost
-    Allow from localhost-ip6
-
-    Options +FollowSymLinks
-    Options -Indexes
-</Directory>
diff --git a/etc/x2gobroker-wsgi.apache.vhost b/etc/x2gobroker-wsgi.apache.vhost
deleted file mode 100644
index 4de60a8..0000000
--- a/etc/x2gobroker-wsgi.apache.vhost
+++ /dev/null
@@ -1,75 +0,0 @@
-###
-### Virtual Host configuration for an X2Go Session Broker
-###
-
-#
-# Make sure to disabled /etc/apache2/x2gobroker-wsgi completely if you
-# prefer setting up the X2Go Session Broker as a virtual host.
-#
-
-# enable debugging
-#SetEnv X2GOBROKER_DEBUG off
-
-# the default user/group that this WSGI application runs as
-#X2GOBROKER_DAEMON_USER=x2gobroker
-#X2GOBROKER_DAEMON_GROUP=x2gobroker
-WSGIDaemonProcess x2gobroker user=x2gobroker group=x2gobroker processes=5 threads=15
-WSGIPassAuthorization On
-
-# default broker backend (default: zeroconf)
-#SetEnv X2GOBROKER_DEFAULT_BACKEND zeroconf
-#SetEnv X2GOBROKER_DEFAULT_BACKEND inifile
-#SetEnv X2GOBROKER_DEFAULT_BACKEND ldap
-#SetEnv X2GOBROKER_DEFAULT_BACKEND <some-other-broker-backend>
-
-# path to the X2Go Session Broker's configuration file
-#SetEnv X2GOBROKER_CONFIG /etc/x2go/x2gobroker.conf
-
-# path to the X2Go Session Broker's session profiles file (when using the inifile backend)
-#SetEnv X2GOBROKER_SESSIONPROFILES /etc/x2go/broker/x2gobroker-sessionprofiles.conf
-
-# path to the X2Go Session Broker's agent command
-#SetEnv X2GOBROKER_AGENT_CMD /usr/lib/x2go/x2gobroker-agent
-
-# authentication socket of the X2Go Broker's PAM Authentication Service
-#SetEnv X2GOBROKER_AUTHSOCKET /run/x2gobroker/x2gobroker-authservice.socket
-
-# if you have to-be-statically-served files somewhere below the broker URL
-#Alias /x2gobroker/static /some/static/path/
-
-WSGIScriptAlias / /usr/sbin/x2gobroker
-WSGIProcessGroup x2gobroker
-
-<VirtualHost *:443>
-
-    ServerName localhost
-    ServerAdmin webmaster at localhost
-
-    SSLEngine on
-    #   SSL Cipher Suite:
-    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
-    #   Server Certificate:
-    SSLCertificateFile /etc/x2go/broker/ssl/broker.crt
-    #   Server Private Key:
-    SSLCertificateKeyFile /etc/x2go/broker/ssl/broker.key
-    #SSLCertificateChainFile /etc/x2go/broker/ssl/cacert.key
-    #SetEnvIf User-Agent ".*MSIE.*" \
-    #    nokeepalive ssl-unclean-shutdown \
-    #    downgrade-1.0 force-response-1.0
-
-    <Directory /usr/sbin/x2gobroker>
-        Order deny,allow
-        Deny from all
-
-        # grant explicit access below
-        Allow from localhost
-        Allow from localhost-ip6
-
-        Options +FollowSymLinks
-        Options -Indexes
-
-        SSLOptions +StdEnvVars
-
-    </Directory>
-
-</VirtualHost>
diff --git a/etc/x2gobroker.conf b/etc/x2gobroker.conf
index 24a530f..85eaa77 100644
--- a/etc/x2gobroker.conf
+++ b/etc/x2gobroker.conf
@@ -71,6 +71,9 @@
 # enable {base_url}/plain/
 #enable-plain-output = true
 
+# enable {base_url}/uccs/
+#enable-uccs-output = false
+
 # enable {base_url}/json/ (THIS IS FUTURE, mg-20121129)
 #enable-json-output = false
 
diff --git a/logrotate/x2gobroker-wsgi b/logrotate/x2gobroker
similarity index 57%
rename from logrotate/x2gobroker-wsgi
rename to logrotate/x2gobroker
index bb040b7..4e8c689 100644
--- a/logrotate/x2gobroker-wsgi
+++ b/logrotate/x2gobroker
@@ -1,4 +1,4 @@
-/var/log/x2gobroker/broker.log /var/log/x2gobroker/error.log /var/log/x2gobroker/wsgi.log {
+/var/log/x2gobroker/*.log {
 	weekly
 	missingok
 	rotate 52
@@ -7,5 +7,7 @@
 	notifempty
 	create 640 x2gobroker adm
 	sharedscripts
+	postrotate
+		/etc/init.d/x2gobroker restart > /dev/null
 	endscript
 }
diff --git a/logrotate/x2gobroker-authservice b/logrotate/x2gobroker-authservice
deleted file mode 100644
index d19cc13..0000000
--- a/logrotate/x2gobroker-authservice
+++ /dev/null
@@ -1,13 +0,0 @@
-/var/log/x2gobroker/authservice.log {
-	weekly
-	missingok
-	rotate 52
-	compress
-	delaycompress
-	notifempty
-	create 640 root adm
-	sharedscripts
-	postrotate
-		invoke-rc.d x2gobroker-authservice restart > /dev/null
-	endscript
-}
diff --git a/logrotate/x2gobroker-daemon b/logrotate/x2gobroker-daemon
deleted file mode 100644
index 31da1bd..0000000
--- a/logrotate/x2gobroker-daemon
+++ /dev/null
@@ -1,13 +0,0 @@
-/var/log/x2gobroker/access.log /var/log/x2gobroker/broker.log /var/log/x2gobroker/error.log {
-	weekly
-	missingok
-	rotate 52
-	compress
-	delaycompress
-	notifempty
-	create 640 x2gobroker adm
-	sharedscripts
-	postrotate
-		invoke-rc.d x2gobroker-daemon restart > /dev/null
-	endscript
-}
diff --git a/man/man8/x2gobroker-testauth.8 b/man/man8/x2gobroker-testauth.8
deleted file mode 100644
index b7e2278..0000000
--- a/man/man8/x2gobroker-testauth.8
+++ /dev/null
@@ -1,64 +0,0 @@
-'\" -*- 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-testauth 8 "April 2013" "Version 0.0.1.y" "X2Go Session Broker"
-.SH NAME
-x2gobroker-testauth \- Session Broker for X2Go (Authentication Test Utility)
-.SH SYNOPSIS
-'nh
-.fi
-.ad l
-\fBx2gobroker-testauth\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-testauth\fR is an authentication test utility for X2Go Session Broker.
-.PP
-WARNING: please know that the credentials you use for testing broker authentication will
-get revealed in your shell's history file (e.g. ~/.bash_history).
-.SH COMMON OPTIONS
-\fBx2gobroker-testauth\fR displays some help on command line options:
-.TP
-\*(T<\fB\-h, \-\-help\fR\*(T>
-Display a help with all available command line options and exit.
-.SH REQUIRED OPTIONS
-For any other operation than the help text, the two options below are required.
-.TP
-\*(T<\fB\-u, \-\-user, \-\-username\fR\*(T>
-Username part of the credentials you want to test.
-.TP
-\*(T<\fB\-p, \-\-password\fR\*(T>
-Password part of the credentials (be sure you want to reveal those on the command line before doing it!!!)
-.SH MISC OPTIONS
-\fBx2gobroker-testauth\fR also accepts the following miscellaneous options:
-.TP
-\*(T<\fB\-d, \-\-debug\fR\*(T>
-Enable debugging code.
-.TP
-\*(T<\fB\-C, \-\-config FILENAME\fR\*(T>
-Specify an alternative configuration file name, default is: \fI/etc/x2go/x2gobroker.conf\fR.
-.TP
-\*(T<\fB\-b, \-\-backend BACKEND\fR\*(T>
-Specify another configured/enabled backend configuration to test authentication against, default is: the \fIzeroconf\fR backend.
-.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 at das-netzwerkteam.de>.
diff --git a/man/man8/x2gobroker.8 b/man/man8/x2gobroker.8
index ec5ac10..8811c2b 100644
--- a/man/man8/x2gobroker.8
+++ b/man/man8/x2gobroker.8
@@ -22,7 +22,7 @@ x2gobroker \- Session Broker for X2Go
 .ad b
 'hy
 .SH DESCRIPTION
-\fBx2gobroker\fR is a Python Tornado based implementation of the X2Go Session Broker API.
+\fBx2gobroker\fR is a Web.py based implementation of the X2Go Session Broker API.
 .PP
 This command is normally executed either through an init script or via the WSGI module in your httpd server.
 .PP
diff --git a/sbin/x2gobroker b/sbin/x2gobroker
index c23e195..05678ab 100755
--- a/sbin/x2gobroker
+++ b/sbin/x2gobroker
@@ -27,6 +27,9 @@ import argparse
 import socket
 import logging
 import thread
+import tornado.web
+import tornado.httpserver
+import tornado.ioloop
 
 try:
     import x2gobroker.defaults
@@ -113,21 +116,19 @@ import x2gobroker.web.extras
 
 # define the web.py URLs
 urls = ( ('/plain/(.*)', x2gobroker.web.plain.X2GoBrokerWeb,),
+         ('/uccs/(.*)', x2gobroker.web.uccs.X2GoBrokerWeb,),
 #        ('/json/(.*)', x2gobroker.web.json.X2GoBrokerWeb,),
 #        ('/html/(.*)', x2gobroker.web.html.X2GoBrokerWeb,),
-         ('/pubkeys(|/)$', x2gobroker.web.extras.X2GoBrokerPubKeyService,),
+         ('/pubkeys/', x2gobroker.web.extras.X2GoBrokerPubKeyService,),
        )
 
 settings = {
     'log_function': tornado_log_request,
 }
+application = tornado.web.Application(urls, **settings)
 
 # run the web.py standalone daemon...
 if __name__ == "__main__":
-    import tornado.web
-    import tornado.httpserver
-    import tornado.ioloop
-    application = tornado.web.Application(urls, **settings)
     try:
         if x2gobroker.defaults.X2GOBROKER_SSL_CERTFILE and x2gobroker.defaults.X2GOBROKER_SSL_KEYFILE:
             # switch on https:// mode
@@ -144,21 +145,3 @@ if __name__ == "__main__":
         tornado.ioloop.IOLoop.instance().start()
     except socket.error, e:
         print (e)
-else:
-    import tornado.wsgi
-    import wsgilog
-    _tornado_application = tornado.wsgi.WSGIApplication(urls, **settings)
-
-    def _application(environ, start_response):
-
-        # some WSGI implementations do not like the SCRIPT_NAME env var
-        if 'SCRIPT_NAME' in environ:
-            del environ['SCRIPT_NAME']
-
-        # make sure the httpd server's environment is set as os.environ
-        os.environ = environ
-        reload(x2gobroker.defaults)
-
-        return _tornado_application(environ, start_response)
-
-    application = wsgilog.WsgiLog(_application, tohtml=True, tofile=True, tostream=False, toprint=False, file='/var/log/x2gobroker/wsgi.log', )
diff --git a/sbin/x2gobroker-authservice b/sbin/x2gobroker-authservice
index 391211a..e17271e 100755
--- a/sbin/x2gobroker-authservice
+++ b/sbin/x2gobroker-authservice
@@ -26,14 +26,14 @@ import sys
 import setproctitle
 import argparse
 import logging
-import asyncore
-import socket
-import getpass
-import logging.config
-import pam
 
-from pwd import getpwnam
-from grp import getgrnam
+try:
+    import x2gobroker.defaults
+except ImportError:
+    sys.path.insert(0, os.path.join(os.getcwd(), '..'))
+    import x2gobroker.defaults
+
+import x2gobroker.authservice
 
 PROG_NAME = os.path.basename(sys.argv[0])
 PROG_OPTIONS = sys.argv[1:]
@@ -41,109 +41,16 @@ setproctitle.setproctitle("%s %s" % (PROG_NAME, " ".join(PROG_OPTIONS)))
 
 from x2gobroker import __VERSION__
 from x2gobroker import __AUTHOR__
-
-
-class AuthClient(asyncore.dispatcher_with_send):
-
-    def __init__(self, sock):
-        asyncore.dispatcher_with_send.__init__(self, sock)
-        self._buf = ''
-
-    def handle_read(self):
-        data = self._buf + self.recv(1024)
-        if not data:
-            self.close()
-            return
-        reqs, data = data.rsplit('\n', 1)
-        self._buf = data
-        for req in reqs.split('\n'):
-            try:
-                user, passwd, service = req.split()
-            except:
-                self.send('bad\n')
-            else:
-                if pam.authenticate(user, passwd, service):
-                    self.send('ok\n')
-                else:
-                    self.send('fail\n')
-
-    def handle_close(self):
-        self.close()
-
-
-class AuthService(asyncore.dispatcher_with_send):
-
-    def __init__(self, socketfile, owner='root', group_owner='root', permissions='0660'):
-        asyncore.dispatcher_with_send.__init__(self)
-        self.create_socket(socket.AF_UNIX, socket.SOCK_STREAM)
-        self.set_reuse_addr()
-        self.bind(socketfile)
-        os.chown(socketfile, getpwnam(owner).pw_uid, getgrnam(group_owner).gr_gid)
-        os.chmod(socketfile, int(permissions, 8))
-        self.listen(1)
-
-    def handle_accept(self):
-        conn, _ = self.accept()
-        AuthClient(conn)
-
-
-def loop():
-    asyncore.loop()
-
-
-# normally this would go into defaults.py, however, we do not want to pull in defaults.py here as that will create
-# unwanted logfiles (access.log, broker.log, error.log) when x2gobroker-authservice is installed as standalone service
-if os.environ.has_key('X2GOBROKER_DEBUG'):
-    X2GOBROKER_DEBUG = ( os.environ['X2GOBROKER_DEBUG'].lower() in ('1', 'on', 'true', 'yes', ) )
-else:
-    X2GOBROKER_DEBUG = False
-if os.environ.has_key('X2GOBROKER_TESTSUITE'):
-    X2GOBROKER_TESTSUITE = ( os.environ['X2GOBROKER_TESTSUITE'].lower() in ('1', 'on', 'true', 'yes', ) )
-else:
-    X2GOBROKER_TESTSUITE = False
-if os.environ.has_key('X2GOBROKER_DAEMON_USER'):
-    X2GOBROKER_DAEMON_USER=os.environ['X2GOBROKER_DAEMON_USER']
-else:
-    X2GOBROKER_DAEMON_USER="x2gobroker"
-if os.environ.has_key('X2GOBROKER_AUTHSERVICE_LOGCONFIG'):
-    X2GOBROKER_AUTHSERVICE_LOGCONFIG=os.environ['X2GOBROKER_AUTHSERVICE_LOGCONFIG']
-else:
-    X2GOBROKER_AUTHSERVICE_LOGCONFIG="/etc/x2go/broker/x2gobroker-authservice-logger.conf"
-if os.environ.has_key('X2GOBROKER_AUTHSERVICE_SOCKET'):
-    X2GOBROKER_AUTHSERVICE_SOCKET=os.environ['X2GOBROKER_AUTHSERVICE_SOCKET']
-else:
-    X2GOBROKER_AUTHSERVICE_SOCKET="/run/x2gobroker/x2gobroker-authservice.socket"
-
-# standalone daemon mode (x2gobroker-authservice as daemon) or interactive mode (called from the cmdline)?
-if getpass.getuser() in (X2GOBROKER_DAEMON_USER, 'root'):
-
-    # we run in standalone daemon mode, so let's use the system configuration for logging
-    logging.config.fileConfig(X2GOBROKER_AUTHSERVICE_LOGCONFIG)
-
-    # create authservice logger
-    logger_authservice = logging.getLogger('authservice')
-
-else:
-    logger_root = logging.getLogger()
-    stderr_handler = logging.StreamHandler(sys.stderr)
-    stderr_handler.setFormatter(logging.Formatter(fmt='%(asctime)s - %(name)s - %(levelname)s - %(message)s', datefmt=''))
-
-    # all loggers stream to stderr...
-    logger_root.addHandler(stderr_handler)
-
-    logger_authservice = logging.getLogger('authservice')
-    logger_authservice.addHandler(stderr_handler)
-    logger_authservice.propagate = 0
-
+from x2gobroker.loggers import logger_authservice
 
 # raise log level to DEBUG if requested...
-if X2GOBROKER_DEBUG and not X2GOBROKER_TESTSUITE:
+if x2gobroker.defaults.X2GOBROKER_DEBUG and not x2gobroker.defaults.X2GOBROKER_TESTSUITE:
     logger_authservice.setLevel(logging.DEBUG)
 
 logger_authservice.info('X2Go Session Broker ({version}), written by {author}'.format(version=__VERSION__, author=__AUTHOR__))
 logger_authservice.info('Setting up the PAM authentication service\'s environment...')
-logger_authservice.info('  X2GOBROKER_DEBUG: {value}'.format(value=X2GOBROKER_DEBUG))
-logger_authservice.info('  X2GOBROKER_AUTHSERVICE_SOCKET: {value}'.format(value=X2GOBROKER_AUTHSERVICE_SOCKET))
+logger_authservice.info('  X2GOBROKER_DEBUG: {value}'.format(value=x2gobroker.defaults.X2GOBROKER_DEBUG))
+logger_authservice.info('  X2GOBROKER_AUTHSERVICE_SOCKET: {value}'.format(value=x2gobroker.defaults.X2GOBROKER_AUTHSERVICE_SOCKET))
 
 # check effective UID the broker runs as and complain appropriately...
 if os.geteuid() != 0:
@@ -152,7 +59,7 @@ if os.geteuid() != 0:
 if __name__ == '__main__':
 
     common_options = [
-        {'args':['-s','--socket-file'], 'default': X2GOBROKER_AUTHSERVICE_SOCKET, 'metavar': 'AUTHSOCKET', 'help': 'socket file for AuthService communication', },
+        {'args':['-s','--socket-file'], 'default': x2gobroker.authservice.X2GOBROKER_AUTHSERVICE_SOCKET, 'metavar': 'AUTHSOCKET', 'help': 'socket file for AuthService communication', },
         {'args':['-o','--owner'], 'default': 'root', 'help': 'owner of the AuthService socket file', },
         {'args':['-g','--group'], 'default': 'root', 'help': 'group ownership of the AuthService socket file', },
         {'args':['-p','--permissions'], 'default': '0660', 'help': 'set these file permissions for the AuthService socket file', },
@@ -172,8 +79,8 @@ if __name__ == '__main__':
     cmdline_args = p.parse_args()
 
     socket_file = cmdline_args.socket_file
-    AuthService(socket_file, owner=cmdline_args.owner, group_owner=cmdline_args.group, permissions=cmdline_args.permissions)
+    x2gobroker.authservice.AuthService(socket_file, owner=cmdline_args.owner, group_owner=cmdline_args.group, permissions=cmdline_args.permissions)
     try:
-        loop()
+        x2gobroker.authservice.loop()
     except KeyboardInterrupt:
         pass
diff --git a/sbin/x2gobroker-pubkeyauthorizer b/sbin/x2gobroker-pubkeyauthorizer
index ff47173..1b707d1 100755
--- a/sbin/x2gobroker-pubkeyauthorizer
+++ b/sbin/x2gobroker-pubkeyauthorizer
@@ -36,7 +36,7 @@ import logging.config
 from pwd import getpwnam
 from grp import getgrnam
 
-__VERSION__ = '0.0.1.2'
+__VERSION__ = '0.0.1.1'
 __AUTHOR__ = 'Mike Gabriel (X2Go Project) <mike.gabriel at das-netzwerkteam.de>'
 
 PROG_NAME = os.path.basename(sys.argv[0])
@@ -66,20 +66,34 @@ else:
 # the home directory of the user that the daemon/cgi runs as
 X2GOBROKER_HOME = os.path.normpath(os.path.expanduser('~{broker_uid}'.format(broker_uid=X2GOBROKER_DAEMON_USER)))
 
-logger_root = logging.getLogger()
-stderr_handler = logging.StreamHandler(sys.stderr)
-stderr_handler.setFormatter(logging.Formatter(fmt='%(asctime)s - %(name)s - %(levelname)s - %(message)s', datefmt=''))
+if os.geteuid() == 0:
 
-# all loggers stream to stderr...
-logger_root.addHandler(stderr_handler)
+    # we run in standalone daemon mode, so let's use the system configuration for logging
+    logging.config.fileConfig(X2GOBROKER_LOGCONFIG)
 
-logger_broker = logging.getLogger('broker')
-logger_broker.addHandler(stderr_handler)
-logger_broker.propagate = 0
+    # create loggers
+    logger_broker = logging.getLogger('broker')
+    logger_error = logging.getLogger('error')
 
-logger_error = logging.getLogger('error')
-logger_error.addHandler(stderr_handler)
-logger_error.propagate = 0
+    # propagate msgs for  the broker logger to the root logger (i.e. to stderr)
+    logger_broker.propagate = 1
+    logger_error.propagate = 1
+
+else:
+    logger_root = logging.getLogger()
+    stderr_handler = logging.StreamHandler(sys.stderr)
+    stderr_handler.setFormatter(logging.Formatter(fmt='%(asctime)s - %(name)s - %(levelname)s - %(message)s', datefmt=''))
+
+    # all loggers stream to stderr...
+    logger_root.addHandler(stderr_handler)
+
+    logger_broker = logging.getLogger('broker')
+    logger_broker.addHandler(stderr_handler)
+    logger_broker.propagate = 0
+
+    logger_error = logging.getLogger('error')
+    logger_error.addHandler(stderr_handler)
+    logger_error.propagate = 0
 
 # raise log level to DEBUG if requested...
 if X2GOBROKER_DEBUG:
diff --git a/x2gobroker/__init__.py b/x2gobroker/__init__.py
index 8da3542..5ebaa35 100644
--- a/x2gobroker/__init__.py
+++ b/x2gobroker/__init__.py
@@ -18,5 +18,14 @@
 # Free Software Foundation, Inc.,
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
-__VERSION__ = '0.0.1.2'
+__VERSION__ = '0.0.1.1'
 __AUTHOR__ = 'Mike Gabriel (X2Go Project) <mike.gabriel at das-netzwerkteam.de>'
+
+from loggers import logger_error
+
+class X2GoBrokerBaseException(BaseException):
+    def __init__(self, *args, **kwargs):
+        BaseException.__init__(self, *args, **kwargs)
+        logger_error.error('An exceptional problem occurred: {exception}("{msg}")'.format(exception=type(self).__name__, msg=str(self)))
+
+class X2GoBrokerAgentException(X2GoBrokerBaseException): pass
diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py
index 35bb6a6..001a800 100644
--- a/x2gobroker/agent.py
+++ b/x2gobroker/agent.py
@@ -31,7 +31,6 @@ x2gobroker._paramiko.monkey_patch_paramiko()
 
 # X2Go Broker modules
 import x2gobroker.defaults
-import x2gobroker.x2gobroker_exceptions
 from x2gobroker.loggers import logger_broker, logger_error
 
 
@@ -84,7 +83,7 @@ def call_local_broker_agent(username, mode, cmdline_args=[]):
     if result[0].startswith('OK'):
         return [ r for r in result[1:] if r ]
 
-    raise x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException('Query to local X2Go Broker Agent failed with no response')
+    raise x2gobroker.X2GoBrokerAgentException('Query to local X2Go Broker Agent failed with no response')
 
 def call_remote_broker_agent(username, mode, cmdline_args=[], remote_agent=None):
     """\
@@ -136,7 +135,7 @@ def call_remote_broker_agent(username, mode, cmdline_args=[], remote_agent=None)
         if result and result[0].startswith('OK'):
             return [ r for r in result[1:] if r ]
     except (paramiko.SSHException, paramiko.AuthenticationException, paramiko.BadHostKeyException, socket.error):
-        raise x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException('Query to remote X2Go Broker Agent (user: {user}, hostname: {hostname}, port: {port}) failed'.format(user=remote_username, hostname=remote_hostname, port=remote_port))
+        raise x2gobroker.X2GoBrokerAgentException('Query to remote X2Go Broker Agent (user: {user}, hostname: {hostname}, port: {port}) failed'.format(user=remote_username, hostname=remote_hostname, port=remote_port))
 
 
 def list_sessions(username, query_mode='LOCAL', remote_agent=None):
diff --git a/x2gobroker/authmechs/pam_authmech.py b/x2gobroker/authmechs/pam_authmech.py
index a596411..7ea2023 100644
--- a/x2gobroker/authmechs/pam_authmech.py
+++ b/x2gobroker/authmechs/pam_authmech.py
@@ -24,7 +24,6 @@ import pam
 
 # X2Go Session Broker modules
 import x2gobroker.authservice
-from x2gobroker.loggers import logger_error
 
 class X2GoBrokerAuthMech(object):
 
@@ -37,7 +36,6 @@ class X2GoBrokerAuthMech(object):
                     return True
 
             except error:
-                logger_error.error('Authentication against authentication service failed, trying direct PAM authentication (which is likely to fail on most PAM setups).')
                 # fallback to direct PAM authentication against the PAM service ,,x2gobroker''
                 if pam.authenticate(username, password, service="x2gobroker"):
                     return True
diff --git a/x2gobroker/authservice.py b/x2gobroker/authservice.py
index bcfc99a..fa7ce84 100644
--- a/x2gobroker/authservice.py
+++ b/x2gobroker/authservice.py
@@ -21,24 +21,79 @@
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
 import os
+import asyncore
+import pam
 import socket
 
-# X2Go Session Broker modules
-import x2gobroker.defaults
-from x2gobroker.loggers import logger_broker
+from pwd import getpwnam
+from grp import getgrnam
+
+from loggers import logger_authservice
+
+logger_authservice.info('X2Go Session Broker PAM Authentication Service: Setting up the broker\'s environment...')
+if os.environ.has_key('X2GOBROKER_AUTHSERVICE_SOCKET'):
+    X2GOBROKER_AUTHSERVICE_SOCKET=os.environ['X2GOBROKER_AUTHSERVICE_SOCKET']
+else:
+    X2GOBROKER_AUTHSERVICE_SOCKET="/var/run/x2gobroker-authservice.socket"
+logger_authservice.info('  X2GOBROKER_AUTHSERVICE_SOCKET: {value}'.format(value=X2GOBROKER_AUTHSERVICE_SOCKET))
+
+
+class AuthClient(asyncore.dispatcher_with_send):
+
+    def __init__(self, sock):
+        asyncore.dispatcher_with_send.__init__(self, sock)
+        self._buf = ''
+
+    def handle_read(self):
+        data = self._buf + self.recv(1024)
+        if not data:
+            self.close()
+            return
+        reqs, data = data.rsplit('\n', 1)
+        self._buf = data
+        for req in reqs.split('\n'):
+            try:
+                user, passwd, service = req.split()
+            except:
+                self.send('bad\n')
+            else:
+                if pam.authenticate(user, passwd, service):
+                    self.send('ok\n')
+                else:
+                    self.send('fail\n')
+
+    def handle_close(self):
+        self.close()
+
+
+class AuthService(asyncore.dispatcher_with_send):
+
+    def __init__(self, socketfile, owner='root', group_owner='root', permissions='0660'):
+        asyncore.dispatcher_with_send.__init__(self)
+        self.create_socket(socket.AF_UNIX, socket.SOCK_STREAM)
+        self.set_reuse_addr()
+        self.bind(socketfile)
+        os.chown(socketfile, getpwnam(owner).pw_uid, getgrnam(group_owner).gr_gid)
+        os.chmod(socketfile, int(permissions, 8))
+        self.listen(1)
+
+    def handle_accept(self):
+        conn, _ = self.accept()
+        AuthClient(conn)
+
+
+def loop():
+    asyncore.loop()
 
 
 def authenticate(username, password, service="x2gobroker"):
     s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
-    logger_broker.debug('connecting to authentication service socket {socket}'.format(socket=x2gobroker.defaults.X2GOBROKER_AUTHSERVICE_SOCKET))
-    s.connect(x2gobroker.defaults.X2GOBROKER_AUTHSERVICE_SOCKET)
-    # FIXME: somehow logging output disappears after we have connected to the socket file...
-    logger_broker.debug('sending username={username}, password=<hidden>, service={service} to authentication service'.format(username=username, service=service))
+    s.connect(X2GOBROKER_AUTHSERVICE_SOCKET)
     s.send('{username} {password} {service}\n'.format(username=username, password=password, service=service))
     result = s.recv(1024)
     s.close()
     if result.startswith('ok'):
-        logger_broker.info('authentication against PAM service »{service}« succeeded for user »{username}«'.format(username=username, service=service))
+        logger_authservice.info('authentication against PAM service »{service}« succeeded for user »{username}«'.format(username=username, service=service))
         return True
-    logger_broker.info('authentication against service »{service}« failed for user »{username}«'.format(username=username, service=service))
+    logger_authservice.info('authentication against service »{service}« failed for user »{username}«'.format(username=username, service=service))
     return False
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index 2ce0ba4..89aadac 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
@@ -65,7 +65,6 @@ class X2GoBroker(object):
         if self.config_file is None: self.config_file = x2gobroker.defaults.X2GOBROKER_CONFIG
         if config_defaults is None: config_defaults = x2gobroker.defaults.X2GOBROKER_CONFIG_DEFAULTS
         self.config = x2gobroker.config.X2GoBrokerConfigFile(config_files=self.config_file, defaults=config_defaults)
-        self.enabled =  self.config.get_value(self.backend_name, 'enable')
 
         self._dynamic_cookie_map = {}
         self._client_address = None
@@ -82,21 +81,7 @@ class X2GoBroker(object):
         Check if this backend has been enabled in the configuration file.
 
         """
-        return self.enabled
-
-    def enable(self):
-        """\
-        Enable this broker backend.
-
-        """
-        self.enabled = True
-
-    def disable(self):
-        """\
-        Disable this broker backend.
-
-        """
-        self.enabled = False
+        return self.config.get_value(self.backend_name, 'enable')
 
     def set_client_address(self, address):
         """\
@@ -432,7 +417,6 @@ class X2GoBroker(object):
     def _do_authenticate(self, username='', password=''):
 
         if self._import_authmech_module(mech=self.get_authentication_mechanism()):
-            logger_broker.debug('base_broker.X2GoBroker._do_authenticate(): authenticating user={username} with password=<hidden> against backend={backend}.'.format(username=username, backend=self.backend_name))
             return self.authmech_module.X2GoBrokerAuthMech().authenticate(username, password)
         else:
             return False
@@ -795,7 +779,6 @@ class X2GoBroker(object):
 
             if self.use_session_autologin(profile_id):
                 profile['autologin'] = True
-                profile['key'] = 'key-comes-later'
 
             acls = self.get_profile_acls(profile_id)
 
@@ -863,7 +846,7 @@ class X2GoBroker(object):
 
                 try:
                     busy_servers = x2gobroker.agent.find_busy_servers(username=username, query_mode=agent_query_mode, remote_agent=remote_agent)
-                except x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException:
+                except x2gobroker.X2GoBrokerAgentException:
                     logger_broker.warning('base_broker.X2GoBroker.select_session(): failed to query broker agent (quey-mode: {query_mode}, remote_agent: {remote_agent})'.format(query_mode=agent_query_mode, remote_agent=remote_agent))
 
                     if agent_query_mode.upper() == u'SSH':
diff --git a/x2gobroker/brokers/zeroconf_broker.py b/x2gobroker/brokers/zeroconf_broker.py
index 6cb83ad..5970659 100644
--- a/x2gobroker/brokers/zeroconf_broker.py
+++ b/x2gobroker/brokers/zeroconf_broker.py
@@ -36,7 +36,7 @@ class X2GoBroker(base.X2GoBroker):
 
     def list_profiles(self, username):
 
-        _list_of_profiles = {
+        list_of_profiles = {
             uuid.uuid4(): {
                 'user': u'',
                 'defsndport': True,
@@ -74,11 +74,6 @@ class X2GoBroker(base.X2GoBroker):
                 'pack': u'16m-jpeg',
             },
         }
-        list_of_profiles = {}
-        for profile_id in _list_of_profiles.keys():
-            profile = self.get_profile_defaults()
-            profile.update(_list_of_profiles[profile_id])
-            list_of_profiles[profile_id] = profile
         return list_of_profiles
 
     def select_session(self, profile_id, username=None):
diff --git a/x2gobroker/defaults.py b/x2gobroker/defaults.py
index 7961f7d..fcbb8ca 100644
--- a/x2gobroker/defaults.py
+++ b/x2gobroker/defaults.py
@@ -56,7 +56,7 @@ else:
 if X2GOBROKER_USER != X2GOBROKER_DAEMON_USER:
     X2GOBROKER_DEBUG = True
 
-# raise log levels to CRITICAL if we are running the unittests...
+# drop og level to CRITICAL if we are running the unittests...
 if X2GOBROKER_TESTSUITE:
     logger_broker.setLevel(logging.CRITICAL)
     logger_access.setLevel(logging.CRITICAL)
@@ -77,7 +77,7 @@ else:
 if os.environ.has_key('X2GOBROKER_AUTHSERVICE_SOCKET'):
     X2GOBROKER_AUTHSERVICE_SOCKET=os.environ['X2GOBROKER_AUTHSERVICE_SOCKET']
 else:
-    X2GOBROKER_AUTHSERVICE_SOCKET="/run/x2gobroker/x2gobroker-authservice.socket"
+    X2GOBROKER_AUTHSERVICE_SOCKET="/var/run/x2gobroker-authservice.socket"
 
 if os.environ.has_key('X2GOBROKER_DEFAULT_BACKEND'):
     X2GOBROKER_DEFAULT_BACKEND = os.environ['X2GOBROKER_DEFAULT_BACKEND']
@@ -118,6 +118,7 @@ X2GOBROKER_CONFIG_DEFAULTS = {
         u'use-static-cookie': False,
         u'my-cookie': uuid.uuid4(),
         u'enable-plain-output': True,
+        u'enable-uccs-output': False,
         u'enable-json-output': False,
         u'enable-html-output':  False,
         u'default-auth-mech': u'pam',
@@ -160,7 +161,6 @@ X2GOBROKER_CONFIG_DEFAULTS = {
 # defaults for X2Go Sessino Broker session profiles file
 X2GOBROKER_SESSIONPROFILE_DEFAULTS = {
     u'DEFAULT': {
-        u'command': u'TERMINAL',
         u'defsndport': True,
         u'useiconv': False,
         u'iconvfrom': u'UTF-8',
@@ -184,7 +184,7 @@ X2GOBROKER_SESSIONPROFILE_DEFAULTS = {
         u'multidisp': False,
         u'sshproxyport': 22,
         u'sound': True,
-        u'rootless': True,
+        u'rootless': False,
         u'iconvto': u'UTF-8',
         u'soundtunnel': True,
         u'dpi': 96,
@@ -193,7 +193,6 @@ X2GOBROKER_SESSIONPROFILE_DEFAULTS = {
         u'pack': u'16m-jpeg',
         u'user': '',
         u'host': [ u'localhost', ],
-        u'directrdp': False,
         u'acl-users-allow': [],
         u'acl-users-deny': [],
         u'acl-users-order': '',
diff --git a/x2gobroker/loggers.py b/x2gobroker/loggers.py
index 2d0963c..e7eabe0 100644
--- a/x2gobroker/loggers.py
+++ b/x2gobroker/loggers.py
@@ -43,6 +43,7 @@ if getpass.getuser() in (X2GOBROKER_DAEMON_USER, 'root'):
 
     # create loggers
     logger_broker = logging.getLogger('broker')
+    logger_authservice = logging.getLogger('authservice')
     logger_access = logging.getLogger('access')
     logger_error = logging.getLogger('error')
 
@@ -58,6 +59,10 @@ else:
     logger_broker.addHandler(stderr_handler)
     logger_broker.propagate = 0
 
+    logger_authservice = logging.getLogger('authservice')
+    logger_authservice.addHandler(stderr_handler)
+    logger_authservice.propagate = 0
+
     logger_access = logging.getLogger('access')
     logger_access.addHandler(stderr_handler)
     logger_access.propagate = 0
diff --git a/x2gobroker/tests/test_broker_base.py b/x2gobroker/tests/test_broker_base.py
index 1371724..0bda18e 100644
--- a/x2gobroker/tests/test_broker_base.py
+++ b/x2gobroker/tests/test_broker_base.py
@@ -274,7 +274,6 @@ check-credentials = false
     def test_getdefaultprofile(self):
         base_backend = self._init_base_backend()
         _expected_profile = {
-            'command': 'TERMINAL',
             'defsndport': True,
             'useiconv': False,
             'iconvfrom': 'UTF-8',
@@ -298,7 +297,7 @@ check-credentials = false
             'multidisp': False,
             'sshproxyport': 22,
             'sound': True,
-            'rootless': True,
+            'rootless': False,
             'iconvto': 'UTF-8',
             'soundtunnel': True,
             'dpi': 96,
@@ -307,7 +306,6 @@ check-credentials = false
             'pack': '16m-jpeg',
             'user': '',
             'host': [u'localhost'],
-            'directrdp': False,
         }
         _profile = base_backend.get_profile_defaults()
         self.assertEqual(len(_expected_profile.keys()), len(_profile.keys()))
diff --git a/x2gobroker/tests/test_broker_inifile.py b/x2gobroker/tests/test_broker_inifile.py
index 6bc62f8..35b4289 100644
--- a/x2gobroker/tests/test_broker_inifile.py
+++ b/x2gobroker/tests/test_broker_inifile.py
@@ -47,96 +47,6 @@ class TestX2GoBrokerBackendInifile(unittest.TestCase):
         for _profile_id in _profile_ids:
             self.assertTrue( ( 'default' not in inifile_backend.get_profile(_profile_id).keys() ) )
 
-    # TEST COMPLETION OF DEFAULTS FROM CODE IN defaults.py
-
-    def test_getprofilecompletion(self):
-        _session_profiles = """
-[DEFAULT]
-exports =
-fullscreen = false
-width = 800
-height = 600
-applications = TERMINAL, WWWBROWSER
-
-[testprofile]
-user = foo
-command = GNOME
-
-"""
-        tf = tempfile.NamedTemporaryFile()
-        print >> tf, _session_profiles
-        tf.seek(0)
-        inifile_backend = inifile.X2GoBroker(profile_config_file=tf.name)
-        _expected_defaults = copy.deepcopy(x2gobroker.defaults.X2GOBROKER_SESSIONPROFILE_DEFAULTS['DEFAULT'])
-        for key in copy.deepcopy(_expected_defaults).keys():
-            if key.startswith('acl-'):
-                del _expected_defaults[key]
-        _expected_defaults.update( {
-            u'exports': '',
-            u'fullscreen': False,
-            u'width': 800,
-            u'height': 600,
-            u'applications': ['TERMINAL','WWWBROWSER',],
-            u'user': 'foo',
-            u'command': 'GNOME',
-        } )
-        # just testing the directrdp hard-coded defaults
-        _expected_defaults.update( {
-            u'directrdp': False,
-        } )
-        _expected_profile = copy.deepcopy(_expected_defaults)
-        _profile = inifile_backend.get_profile('testprofile')
-        print _expected_defaults
-        for key in _expected_profile.keys():
-            self.assertTrue( ( key in _profile.keys() ) )
-        for key in _profile.keys():
-            self.assertTrue( ( key in _expected_profile.keys()  and _profile[key] == _expected_profile[key] ) )
-
-    # TEST COMPLETION OF DEFAULTS FROM CODE IN defaults.py
-
-    def test_getprofilecompletion(self):
-        _session_profiles = """
-[DEFAULT]
-exports =
-fullscreen = false
-width = 800
-height = 600
-applications = TERMINAL, WWWBROWSER
-
-[testprofile]
-user = foo
-command = GNOME
-
-"""
-        tf = tempfile.NamedTemporaryFile()
-        print >> tf, _session_profiles
-        tf.seek(0)
-        inifile_backend = inifile.X2GoBroker(profile_config_file=tf.name)
-        _expected_defaults = copy.deepcopy(x2gobroker.defaults.X2GOBROKER_SESSIONPROFILE_DEFAULTS['DEFAULT'])
-        for key in copy.deepcopy(_expected_defaults).keys():
-            if key.startswith('acl-'):
-                del _expected_defaults[key]
-        _expected_defaults.update( {
-            u'exports': '',
-            u'fullscreen': False,
-            u'width': 800,
-            u'height': 600,
-            u'applications': ['TERMINAL','WWWBROWSER',],
-            u'user': 'foo',
-            u'command': 'GNOME',
-        } )
-        # just testing the directrdp hard-coded defaults
-        _expected_defaults.update( {
-            u'directrdp': False,
-        } )
-        _expected_profile = copy.deepcopy(_expected_defaults)
-        _profile = inifile_backend.get_profile('testprofile')
-        for key in _expected_profile.keys():
-            self.assertTrue( ( key in _profile.keys() ) )
-        for key in _profile.keys():
-            self.assertTrue( ( key in _expected_profile.keys()  and _profile[key] == _expected_profile[key] ) )
-
-
     ### TEST SESSION PROFILES: get_profile_defaults()
 
     def test_getprofiledefaults(self):
@@ -164,16 +74,16 @@ applications = TERMINAL, WWWBROWSER
 
 [testprofile1]
 user = foo
-command = GNOME
+cmd = GNOME
 
 [testprofile2]
 user = bar
-command = KDE
+cmd = KDE
 fullscreen = true
 
 [testprofile3]
 user = bar
-command = KDE
+cmd = KDE
 fullscreen = true
 acl-users-deny = ALL
 acl-users-allow = foo,bar
@@ -192,23 +102,23 @@ acl-users-order = deny-allow
             u'fullscreen': False,
             u'width': 800,
             u'height': 600,
-            u'applications': ['TERMINAL','WWWBROWSER',],
+            u'applications': ['TERMINAL','WWWBROWSER',]
         } )
         _expected_profile1 = copy.deepcopy(_expected_defaults)
         _expected_profile1.update({
             u'user': 'foo',
-            u'command': 'GNOME',
+            u'cmd': 'GNOME',
         })
         _expected_profile2 = copy.deepcopy(_expected_defaults)
         _expected_profile2.update({
             u'user': 'bar',
-            u'command': 'KDE',
+            u'cmd': 'KDE',
             u'fullscreen': True,
         })
         _expected_profile3 = copy.deepcopy(_expected_defaults)
         _expected_profile3.update({
             u'user': 'bar',
-            u'command': 'KDE',
+            u'cmd': 'KDE',
             u'fullscreen': True,
         })
         _profile1 = inifile_backend.get_profile('testprofile1')
@@ -244,16 +154,16 @@ acl-clients-allow = 10.0.0.0/16,10.1.0.0/16,admin-1.intern,admin-2.intern
 
 [testprofile1]
 user = foo
-command = GNOME
+cmd = GNOME
 
 [testprofile2]
 user = foo
-command = GNOME
+cmd = GNOME
 acl-clients-deny = 10.0.2.0/24,ALL
 
 [testprofile3]
 user = bar
-command = KDE
+cmd = KDE
 fullscreen = true
 acl-users-deny = ALL
 acl-users-allow = foo,bar
@@ -313,15 +223,15 @@ applications = TERMINAL, WWWBROWSER
 
 [testprofile1]
 user =
-command = GNOME
+cmd = GNOME
 
 [testprofile2]
 user =
-command = XFCE
+cmd = XFCE
 
 [testprofile3]
 user =
-command = KDE
+cmd = KDE
 fullscreen = true
 """
         tf = tempfile.NamedTemporaryFile()
@@ -363,21 +273,21 @@ acl-groups-order = deny-allow
 
 [testprofile1]
 user =
-command = GNOME
+cmd = GNOME
 acl-users-allow = flip
 acl-users-deny = ALL
 acl-users-order = deny-allow
 
 [testprofile2]
 user =
-command = XFCE
+cmd = XFCE
 acl-users-allow = thekla
 acl-users-deny = ALL
 acl-users-order = deny-allow
 
 [testprofile3]
 user =
-command = KDE
+cmd = KDE
 fullscreen = true
 acl-users-deny = willi
 acl-users-order = deny-allow
@@ -392,40 +302,40 @@ acl-users-order = deny-allow
         list_of_profile_ids = list_of_profiles.keys()
         list_of_profile_ids.sort()
         self.assertEqual(list_of_profile_ids, ['testprofile1'])
-        self.assertEqual(list_of_profiles['testprofile1']['command'], 'GNOME')
+        self.assertEqual(list_of_profiles['testprofile1']['cmd'], 'GNOME')
 
         username_m = 'maja'
         list_of_profiles = inifile_backend.list_profiles(username_m)
         list_of_profile_ids = list_of_profiles.keys()
         list_of_profile_ids.sort()
         self.assertEqual(list_of_profile_ids, ['testprofile1', 'testprofile2', 'testprofile3'])
-        self.assertEqual(list_of_profiles['testprofile1']['command'], 'GNOME')
-        self.assertEqual(list_of_profiles['testprofile2']['command'], 'XFCE')
-        self.assertEqual(list_of_profiles['testprofile3']['command'], 'KDE')
+        self.assertEqual(list_of_profiles['testprofile1']['cmd'], 'GNOME')
+        self.assertEqual(list_of_profiles['testprofile2']['cmd'], 'XFCE')
+        self.assertEqual(list_of_profiles['testprofile3']['cmd'], 'KDE')
 
         username_k = 'kassandra'
         list_of_profiles = inifile_backend.list_profiles(username_k)
         list_of_profile_ids = list_of_profiles.keys()
         list_of_profile_ids.sort()
         self.assertEqual(list_of_profile_ids, ['testprofile1', 'testprofile2', 'testprofile3'])
-        self.assertEqual(list_of_profiles['testprofile1']['command'], 'GNOME')
-        self.assertEqual(list_of_profiles['testprofile2']['command'], 'XFCE')
-        self.assertEqual(list_of_profiles['testprofile3']['command'], 'KDE')
+        self.assertEqual(list_of_profiles['testprofile1']['cmd'], 'GNOME')
+        self.assertEqual(list_of_profiles['testprofile2']['cmd'], 'XFCE')
+        self.assertEqual(list_of_profiles['testprofile3']['cmd'], 'KDE')
 
         username_t = 'thekla'
         list_of_profiles = inifile_backend.list_profiles(username_t)
         list_of_profile_ids = list_of_profiles.keys()
         list_of_profile_ids.sort()
         self.assertEqual(list_of_profile_ids, ['testprofile2'])
-        self.assertEqual(list_of_profiles['testprofile2']['command'], 'XFCE')
+        self.assertEqual(list_of_profiles['testprofile2']['cmd'], 'XFCE')
 
         username_w = 'willi'
         list_of_profiles = inifile_backend.list_profiles(username_w)
         list_of_profile_ids = list_of_profiles.keys()
         list_of_profile_ids.sort()
         self.assertEqual(list_of_profile_ids, ['testprofile1', 'testprofile2'])
-        self.assertEqual(list_of_profiles['testprofile1']['command'], 'GNOME')
-        self.assertEqual(list_of_profiles['testprofile2']['command'], 'XFCE')
+        self.assertEqual(list_of_profiles['testprofile1']['cmd'], 'GNOME')
+        self.assertEqual(list_of_profiles['testprofile2']['cmd'], 'XFCE')
 
     ### TEST: select_session() method
 
diff --git a/x2gobroker/tests/test_broker_zeroconf.py b/x2gobroker/tests/test_broker_zeroconf.py
index 485e8bd..0e97b66 100644
--- a/x2gobroker/tests/test_broker_zeroconf.py
+++ b/x2gobroker/tests/test_broker_zeroconf.py
@@ -63,8 +63,6 @@ class TestX2GoBrokerBackendZeroconf(unittest.TestCase):
                 'sshport': 22,
                 'setdpi': 0,
                 'pack': u'16m-jpeg',
-                # make sure, hard-coded defaults end up in the list_profiles() output of the zeroconf backend, as well
-                'directrdp': False,
             },
         }
         zeroconf_backend = x2gobroker.brokers.zeroconf_broker.X2GoBroker()
diff --git a/x2gobroker/tests/test_web_plain_zeroconf.py b/x2gobroker/tests/test_web_plain_zeroconf.py
index 8b98daf..dad829b 100644
--- a/x2gobroker/tests/test_web_plain_zeroconf.py
+++ b/x2gobroker/tests/test_web_plain_zeroconf.py
@@ -52,10 +52,11 @@ desktop-shell = KDE
         r.mustcontain('START_USER_SESSIONS')
         r.mustcontain('command=KDE')
         r.mustcontain('END_USER_SESSIONS')
-        r.mustcontain(no='<BR>',)
-        r.mustcontain(no='<br>',)
-        r.mustcontain(no='<BR />', )
-        r.mustcontain(no='<br />', )
+        # FIXME: get html tags out of the text/plain web renderer, needs patching of X2Go Client
+        #r.mustcontain(no='<BR>',)
+        #r.mustcontain(no='<br>',)
+        #r.mustcontain(no='<BR />', )
+        #r.mustcontain(no='<br />', )
         tf.close()
         _config = """
 [zeroconf]
diff --git a/x2gobroker/web/extras.py b/x2gobroker/web/extras.py
index cdb810b..e1adf2a 100644
--- a/x2gobroker/web/extras.py
+++ b/x2gobroker/web/extras.py
@@ -42,7 +42,7 @@ class X2GoBrokerPubKeyService(tornado.web.RequestHandler):
         for http_header_item in self.http_header_items.keys():
             self.set_header(http_header_item, self.http_header_items[http_header_item])
 
-    def get(self, *args, **kwargs):
+    def GET(self):
 
         output = ""
 
@@ -56,4 +56,7 @@ class X2GoBrokerPubKeyService(tornado.web.RequestHandler):
             pubkey = paramiko.DSSKey(filename='{home}/.ssh/id_dsa'.format(home=broker_home))
             output += 'ssh-dss {pubkey} {user}@{hostname}\n'.format(pubkey=str(pubkey.get_base64()), user=x2gobroker.defaults.X2GOBROKER_DAEMON_USER, hostname=x2gobroker.defaults.X2GOBROKER_HOSTNAME)
 
+        if not output:
+            raise tornado.web.HTTPError(404)
+
         self.write(output)
diff --git a/x2gobroker/web/html.py b/x2gobroker/web/html.py
index 0cfb97e..fd76eb8 100644
--- a/x2gobroker/web/html.py
+++ b/x2gobroker/web/html.py
@@ -65,12 +65,11 @@ $output
             self.set_header(http_header_item, self.http_header_items[http_header_item])
 
     def get(self, backend):
+        self._gen_http_header()
         return self.post(backend)
 
     def post(self, backend):
 
-        self._gen_http_header()
-
         if not backend:
             backend = _X2GOBROKER_DEFAULT_BACKEND
         else:
@@ -78,14 +77,8 @@ $output
 
         # silence pyflakes...
         broker_backend = None
-        try:
-            # dynamically detect broker backend from given URL
-            exec("import x2gobroker.brokers.{backend}_broker".format(backend=backend))
-            exec("broker_backend = x2gobroker.brokers.{backend}_broker.X2GoBroker()".format(backend=backend))
-        except ImportError:
-            # throw a 404 if the backend does not exist
-            raise tornado.web.HTTPError(405)
-
+        exec("import x2gobroker.brokers.{backend}_broker".format(backend=backend))
+        exec("broker_backend = x2gobroker.brokers.{backend}_broker.X2GoBroker()".format(backend=backend))
         global_config = broker_backend.get_global_config()
         backend_config = broker_backend.get_backend_config(backend)
 
diff --git a/x2gobroker/web/plain.py b/x2gobroker/web/plain.py
index ca041df..c4deb42 100644
--- a/x2gobroker/web/plain.py
+++ b/x2gobroker/web/plain.py
@@ -44,14 +44,13 @@ class X2GoBrokerWeb(tornado.web.RequestHandler):
 
     def get(self, backend):
         if x2gobroker.defaults.X2GOBROKER_DEBUG:
+            self._gen_http_header()
             logger_broker.warn('GET http request detected, if unwanted: disable X2GOBROKER_DEBUG')
             return self.post(backend)
-        raise tornado.web.HTTPError(405)
+        raise tornado.web.HTTPError(404)
 
     def post(self, backend):
 
-        self._gen_http_header()
-
         if not backend:
             backend = x2gobroker.defaults.X2GOBROKER_DEFAULT_BACKEND
         else:
@@ -59,14 +58,9 @@ class X2GoBrokerWeb(tornado.web.RequestHandler):
 
         # silence pyflakes...
         broker_backend = None
-        try:
-            # dynamically detect broker backend from given URL
-            exec("import x2gobroker.brokers.{backend}_broker".format(backend=backend))
-            exec("broker_backend = x2gobroker.brokers.{backend}_broker.X2GoBroker()".format(backend=backend))
-        except ImportError:
-            # throw a 404 if the backend does not exist
-            raise tornado.web.HTTPError(404)
-
+        # dynamically detect broker backend from given URL
+        exec("import x2gobroker.brokers.{backend}_broker".format(backend=backend))
+        exec("broker_backend = x2gobroker.brokers.{backend}_broker.X2GoBroker()".format(backend=backend))
         global_config = broker_backend.get_global_config()
 
         # if the broker backend is disabled in the configuration, pretend to have nothing on offer
diff --git a/x2gobroker/x2gobroker_exceptions.py b/x2gobroker/x2gobroker_exceptions.py
deleted file mode 100644
index d458419..0000000
--- a/x2gobroker/x2gobroker_exceptions.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (C) 2012 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
-# Copyright (C) 2012 by Oleksandr Shneyder <oleksandr.shneyder at 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
-# 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.
-
-from loggers import logger_error
-
-class X2GoBrokerBaseException(BaseException):
-    def __init__(self, *args, **kwargs):
-        BaseException.__init__(self, *args, **kwargs)
-        logger_error.error('An exceptional problem occurred: {exception}("{msg}")'.format(exception=type(self).__name__, msg=str(self)))
-
-class X2GoBrokerAgentException(X2GoBrokerBaseException): pass


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).




More information about the x2go-commits mailing list