This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2gobroker. from 7c20ceb x2gobroker.spec: Fixing numbering of the SourceX: fields. new 477949a x2gobroker.1: Mention x2gobroker-ssh in its man page, differentiate between the different modes (http/ssh) of the x2gobroker application. new 3b09389 whitespace fixes new f436f27 Add init script x2gobroker-loadchecker.init for SystemV and RPM based Linux distros. new e03923f pyflakes cleanup new f4490af fix comment in x2gobroker-authservice The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: man/man1/x2gobroker.1 | 24 ++++++++--- rpm/x2gobroker-authservice.init | 1 - rpm/x2gobroker-daemon.init | 1 - ...uthservice.init => x2gobroker-loadchecker.init} | 35 ++++++++------- sbin/x2gobroker-authservice | 2 +- setup.py | 2 + x2gobroker/authmechs/https_get_authmech.py | 7 +-- x2gobroker/authservice.py | 1 - x2gobroker/brokers/base_broker.py | 6 +-- x2gobroker/client/plain.py | 4 +- x2gobroker/defaults.py | 4 +- x2gobroker/tests/test_broker_agent.py | 6 ++- x2gobroker/tests/test_broker_inifile.py | 45 -------------------- x2gobroker/tests/test_client_plain_base.py | 2 +- x2gobroker/tests/test_utils.py | 1 - x2gobroker/tests/test_web_plain_base.py | 2 +- x2gobroker/tests/test_web_plain_inifile.py | 6 +-- x2gobroker/tests/test_web_plain_zeroconf.py | 2 +- x2gobroker/tests/test_web_uccs_zeroconf.py | 5 +-- x2gobroker/utils.py | 6 +-- x2gobroker/web/extras.py | 2 - x2gobroker/web/json.py | 3 +- x2gobroker/web/plain.py | 2 +- x2gobroker/web/uccs.py | 3 -- 24 files changed, 60 insertions(+), 112 deletions(-) copy rpm/{x2gobroker-authservice.init => x2gobroker-loadchecker.init} (72%) -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 477949ad3dbcb2a65a511d89023020b8b807650c Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Mar 26 13:46:53 2015 +0100 x2gobroker.1: Mention x2gobroker-ssh in its man page, differentiate between the different modes (http/ssh) of the x2gobroker application. --- man/man1/x2gobroker.1 | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/man/man1/x2gobroker.1 b/man/man1/x2gobroker.1 index fdff520..4295926 100644 --- a/man/man1/x2gobroker.1 +++ b/man/man1/x2gobroker.1 @@ -7,7 +7,7 @@ .if \n(.g .mso www.tmac .TH x2gobroker 1 "Feb 2014" "Version 0.0.3.x" "X2Go Session Broker" .SH NAME -x2gobroker,x2gobroker-daemon \- Session Broker for X2Go +x2gobroker{,-daemon,-ssh} \- Session Broker for X2Go .SH SYNOPSIS 'nh .fi @@ -30,15 +30,27 @@ x2gobroker,x2gobroker-daemon \- Session Broker for X2Go ] 'in \n(.iu-\nxu .ad b +.PP +.ad l +\fBx2gobroker-ssh\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[ +\fIoptions\fR +] +'in \n(.iu-\nxu +.ad b 'hy .SH DESCRIPTION -\fBx2gobroker\fR is a Python Tornado based implementation of the X2Go Session Broker API. +\fBx2gobroker\fR (resp. \fBx2gobroker-daemon\fR) is a Python Tornado based implementation of the X2Go Session Broker API. \fBx2gobroker-ssh\fR is the same application but designed +for usage via SSH (as a command line tool). .PP -This command is normally executed either through the host's init system or via the WSGI module in your httpd server. +The HTTP(S) implementation of \fBx2gobroker\fR is normally executed either through the host's init system or via the WSGI module in your httpd server. The SSH +implementation is executed by X2Go clients through SSH. .PP See the included README and TODO for further information on \fBx2gobroker\fR. .SH GENERAL OPTIONS -\fBx2gobroker\fR accepts the following common options: +\fBx2gobroker{,-daemon,-ssh}\fR accepts the following common options: .TP \*(T<\fB\-M, \-\-mode {HTTP|SSH}\fR\*(T> Set X2Go Session Broker into HTTP or SSH mode. If this option is omitted, then SSH is the default mode. @@ -54,7 +66,7 @@ broker API through a normal web browser. \*(T<\fB\-h, \-\-help\fR\*(T> Display a help with all available command line options and exit. .SH SSH MODE COMMAND LINE OPTIONS -\fBx2gobroker\fR\-\-when run from the command line or via SSH\-\-accepts/requires these additional options: +\fBx2gobroker-ssh\fR, i.e., when run from the command line or via SSH, accepts/requires these additional options: .TP \*(T<\fB\-\-task {listsessions, selectsession, setpass, testcon}\fR\*(T> Specify the either of the known broker tasks (listsessions, selectsession, setpass, testcon). This parameter @@ -78,7 +90,7 @@ For the \fIselectsession\fR task the session profile ID has to be given as an ad \*(T<\fB\-\-backend BACKEND_NAME\fR\*(T> Query another than the default broker backend. .SH HTTP(S) DAEMON OPTIONS -\fBx2gobroker\fR in standalone HTTP(S) daemon mode accepts these additional options: +\fBx2gobroker-daemon\fR in standalone HTTP(S) daemon mode accepts these additional options: .TP \*(T<\fB\-b, \-\-bind ADDRESS:PORT\fR\*(T> The [address:]port that the Tornado http-engine will bind to (default: 127.0.0.1:8080). -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 3b09389514e936fbe60724201beb4907f973a4dc Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Mar 26 13:47:16 2015 +0100 whitespace fixes --- rpm/x2gobroker-authservice.init | 1 - rpm/x2gobroker-daemon.init | 1 - 2 files changed, 2 deletions(-) diff --git a/rpm/x2gobroker-authservice.init b/rpm/x2gobroker-authservice.init index 9ccaf6c..750536a 100755 --- a/rpm/x2gobroker-authservice.init +++ b/rpm/x2gobroker-authservice.init @@ -161,4 +161,3 @@ case "$1" in ;; esac exit $? - diff --git a/rpm/x2gobroker-daemon.init b/rpm/x2gobroker-daemon.init index df6fda3..c0e7870 100755 --- a/rpm/x2gobroker-daemon.init +++ b/rpm/x2gobroker-daemon.init @@ -161,4 +161,3 @@ case "$1" in exit 2 esac exit $? - -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit f436f27872b42a17e45ebe22f15dba9c34409e32 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Mar 26 13:48:03 2015 +0100 Add init script x2gobroker-loadchecker.init for SystemV and RPM based Linux distros. --- rpm/x2gobroker-loadchecker.init | 163 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) diff --git a/rpm/x2gobroker-loadchecker.init b/rpm/x2gobroker-loadchecker.init new file mode 100755 index 0000000..bc4891c --- /dev/null +++ b/rpm/x2gobroker-loadchecker.init @@ -0,0 +1,163 @@ +#!/bin/sh +# +# x2gobroker-loadchecker - Starts/stop the "x2gobroker-loadchecker" daemon +# +# chkconfig: 2345 99 1 +# description: Cleans the X2Go session database + +### BEGIN INIT INFO +# Provides: x2gobroker-loadchecker +# Required-Start: $local_fs +# Required-Stop: $local_fs +# Default-Start: 2345 +# Default-Stop: 016 +# Short-Description: X2Go Session Broker PAM Authentication Service +# Description: PAM authentication service for X2Go Session Broker +### END INIT INFO + +# Source function library. +. /etc/rc.d/init.d/functions + +set -e + +LOADCHECKER=/usr/sbin/x2gobroker-loadchecker +test -d /run && RUNDIR=/run || RUNDIR=/var/run +PIDFILE_LOADCHECKER=$RUNDIR/x2gobroker/x2gobroker-loadchecker.pid +DEFAULTCONFIG_COMMON=/etc/default/python-x2gobroker +DEFAULTCONFIG_LOADCHECKER=/etc/default/x2gobroker-loadchecker + +test -x "$LOADCHECKER" || exit 0 + +START_LOADCHECKER=false +X2GOBROKER_DEBUG=0 +X2GOBROKER_DAEMON_USER='x2gobroker' +X2GOBROKER_DAEMON_GROUP='x2gobroker' +X2GOBROKER_LOADCHECKER_SOCKET="$RUNDIR/x2gobroker/x2gobroker-loadchecker.socket" +test -f $DEFAULTCONFIG_COMMON && . $DEFAULTCONFIG_COMMON +test -f $DEFAULTCONFIG_LOADCHECKER && . $DEFAULTCONFIG_LOADCHECKER + +if ! getent passwd $X2GOBROKER_DAEMON_USER 1>/dev/null 2>/dev/null; then + X2GOBROKER_DAEMON_USER=nobody +fi +if ! getent group $X2GOBROKER_DAEMON_GROUP 1>/dev/null 2>/dev/null; then + X2GOBROKER_DAEMON_GROUP=nobody +fi + +export X2GOBROKER_DEBUG +export X2GOBROKER_DAEMON_USER +export X2GOBROKER_DAEMON_GROUP +export X2GOBROKER_LOADCHECKER_SOCKET + +exec=$LOADCHECKER +prog=$(basename $LOADCHECKER) +config=$DEFAULTCONFIG_LOADCHECKER +OPTS="-D -P $PIDFILE_LOADCHECKER -s $X2GOBROKER_LOADCHECKER_SOCKET -o $X2GOBROKER_DAEMON_USER -g $X2GOBROKER_DAEMON_GROUP -p 0660" + +lockfile=/var/lock/subsys/$prog + + +is_true() +{ + case "${1:-}" in + [Yy]es|[Yy]|1|[Tt]|[Tt]rue) return 0;; + *) return 1; + esac +} + + +start() { +[ -x $exec ] || exit 5 + if is_true $START_LOADCHECKER; then + # Make sure these are created by default so that nobody else can + echo -n $"Starting $prog: " + set +e + daemon $exec $OPTS + retval=$? + set -e + echo + [ $retval -eq 0 ] && touch $lockfile + fi +} + + +stop() { + echo -n $"Stopping $prog: " + set +e + killproc -p $PIDFILE_LOADCHECKER $exec + retval=$? + set -e + echo + rm -f $lockfile + return $retval +} + + +restart() { + stop + start +} + + +reload() { + restart +} + + +force_reload() { + restart +} + + +rh_status() { + # run checks to determine if the service is running or use generic status + status -p $PIDFILE_LOADCHECKER $exec +} + + +rh_status_q() { + rh_status 1>/dev/null 2>&1 +} + + +case "$1" in + start) + set +e + rh_status_q && exit 0 + set -e + $1 + ;; + stop) + set +e + rh_status_q || exit 0 + set -e + $1 + ;; + restart) + $1 + ;; + reload) + set +e + rh_status_q || exit 7 + set -e + $1 + ;; + force-reload) + force_reload + ;; + status) + set +e + rh_status + set -e + ;; + condrestart|try-restart) + set +e + rh_status_q || exit 0 + set -e + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 + ;; +esac +exit $? -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit e03923f69b4b21ff60a6fa825f479ffce8f68d26 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Mar 26 14:48:50 2015 +0100 pyflakes cleanup --- setup.py | 2 ++ x2gobroker/authmechs/https_get_authmech.py | 7 +---- x2gobroker/authservice.py | 1 - x2gobroker/brokers/base_broker.py | 6 ++-- x2gobroker/client/plain.py | 4 +-- x2gobroker/defaults.py | 4 +-- x2gobroker/tests/test_broker_agent.py | 6 ++-- x2gobroker/tests/test_broker_inifile.py | 45 --------------------------- x2gobroker/tests/test_client_plain_base.py | 2 +- x2gobroker/tests/test_utils.py | 1 - x2gobroker/tests/test_web_plain_base.py | 2 +- x2gobroker/tests/test_web_plain_inifile.py | 6 ++-- x2gobroker/tests/test_web_plain_zeroconf.py | 2 +- x2gobroker/tests/test_web_uccs_zeroconf.py | 5 ++- x2gobroker/utils.py | 6 ++-- x2gobroker/web/extras.py | 2 -- x2gobroker/web/json.py | 3 +- x2gobroker/web/plain.py | 2 +- x2gobroker/web/uccs.py | 3 -- 19 files changed, 24 insertions(+), 85 deletions(-) diff --git a/setup.py b/setup.py index d83c902..49299d2 100755 --- a/setup.py +++ b/setup.py @@ -23,9 +23,11 @@ from setuptools import setup, find_packages import os +__VERSION__ = None for line in file(os.path.join('x2gobroker', '__init__.py')).readlines(): if (line.startswith('__VERSION__')): exec(line.strip()) +__AUTHOR__ = None for line in file(os.path.join('x2gobroker', '__init__.py')).readlines(): if (line.startswith('__AUTHOR__')): exec(line.strip()) diff --git a/x2gobroker/authmechs/https_get_authmech.py b/x2gobroker/authmechs/https_get_authmech.py index dc5a085..c4c2599 100644 --- a/x2gobroker/authmechs/https_get_authmech.py +++ b/x2gobroker/authmechs/https_get_authmech.py @@ -31,13 +31,8 @@ # attack. # modules -import sys import httplib import base64 -import string -import ConfigParser - -from x2gobroker.defaults import X2GOBROKER_CONFIG as _X2GOBROKER_CONFIG class X2GoBrokerAuthMech(object): @@ -60,7 +55,7 @@ class X2GoBrokerAuthMech(object): https = httplib.HTTPSConnection(host,port) https.putrequest("GET", path) https.putheader("Host", host) - https.putheader("User-Agent", "x2go http auth") + https.putheader("User-Agent", "X2Go Session Broker") https.putheader("Authorization", "Basic %s" % auth) https.endheaders() diff --git a/x2gobroker/authservice.py b/x2gobroker/authservice.py index 93e3e42..35f7171 100644 --- a/x2gobroker/authservice.py +++ b/x2gobroker/authservice.py @@ -18,7 +18,6 @@ # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -import os import socket # X2Go Session Broker modules diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py index 189c679..f7fe912 100644 --- a/x2gobroker/brokers/base_broker.py +++ b/x2gobroker/brokers/base_broker.py @@ -483,6 +483,7 @@ class X2GoBroker(object): def _import_authmech_module(self, mech='pam'): try: if self.authmech_module is None: + _authmech_module = None exec("import x2gobroker.authmechs.{mech}_authmech as _authmech_module".format(mech=mech)) self.authmech_module = _authmech_module return True @@ -764,6 +765,7 @@ class X2GoBroker(object): def _import_nameservice_module(self, service='libnss'): try: if self.nameservice_module is None: + _nameservice_module = None exec("import x2gobroker.nameservices.{service}_nameservice as _nameservice_module".format(service=service)) self.nameservice_module = _nameservice_module return True @@ -1224,7 +1226,6 @@ class X2GoBroker(object): profile['rootless'] = False remote_agent = self.get_remote_agent(profile_id) - agent_query_mode = ( remote_agent == u'LOCAL') and u'LOCAL' or u'SSH' if self.check_for_sessions(profile_id): if remote_agent: try: @@ -1309,9 +1310,6 @@ class X2GoBroker(object): # try to retrieve contact to a remote broker agent remote_agent = self.get_remote_agent(profile_id) - if remote_agent: - agent_query_mode = ( remote_agent == u'LOCAL') and u'LOCAL' or u'SSH' - # check for already running sessions for the given user (if any is given) session_list = [] if remote_agent and username: diff --git a/x2gobroker/client/plain.py b/x2gobroker/client/plain.py index 4b0dece..d4cfd9c 100644 --- a/x2gobroker/client/plain.py +++ b/x2gobroker/client/plain.py @@ -25,7 +25,7 @@ import types # Python X2Go Broker modules import x2gobroker.defaults -from x2gobroker.loggers import logger_broker, logger_error +from x2gobroker.loggers import logger_broker def _override_do_authenticate(username='', password=''): return True @@ -55,8 +55,6 @@ class X2GoBrokerClient(object): if broker_backend.is_enabled(): - global_config = broker_backend.get_global_config() - if os.environ.has_key('SSH_CLIENT'): ip = os.environ['SSH_CLIENT'].split()[0] else: diff --git a/x2gobroker/defaults.py b/x2gobroker/defaults.py index a6d4830..382fac5 100644 --- a/x2gobroker/defaults.py +++ b/x2gobroker/defaults.py @@ -19,14 +19,12 @@ # modules import os -import sys import uuid -import getpass import socket import pwd, grp import logging -from loggers import logger_broker, logger_access, logger_error, PROG_NAME, X2GOBROKER_DAEMON_USER +from loggers import logger_broker, logger_access, logger_error, X2GOBROKER_DAEMON_USER from loggers import iniconfig_loaded if iniconfig_loaded: from loggers import iniconfig, iniconfig_section diff --git a/x2gobroker/tests/test_broker_agent.py b/x2gobroker/tests/test_broker_agent.py index 795ea94..2aaa252 100644 --- a/x2gobroker/tests/test_broker_agent.py +++ b/x2gobroker/tests/test_broker_agent.py @@ -19,7 +19,6 @@ import unittest import tempfile -import copy import time # Python X2GoBroker modules @@ -504,9 +503,12 @@ broker-portscan-x2goservers = true self.assertTrue ( remote_agent['hostaddr'] != 'downhost1.external') i += 1 + x2gobroker.agent._call_local_broker_agent = _save_local_broker_agent_call + x2gobroker.agent._call_remote_broker_agent = _save_remote_broker_agent_call + x2gobroker.utils.portscan = _save_portscan + def test_suite(): from unittest import TestSuite, makeSuite suite = TestSuite() suite.addTest(makeSuite(TestX2GoBrokerAgent)) return suite - diff --git a/x2gobroker/tests/test_broker_inifile.py b/x2gobroker/tests/test_broker_inifile.py index 4ebaf1a..27e48c9 100644 --- a/x2gobroker/tests/test_broker_inifile.py +++ b/x2gobroker/tests/test_broker_inifile.py @@ -91,51 +91,6 @@ command = GNOME 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): diff --git a/x2gobroker/tests/test_client_plain_base.py b/x2gobroker/tests/test_client_plain_base.py index 432287c..6d72b30 100644 --- a/x2gobroker/tests/test_client_plain_base.py +++ b/x2gobroker/tests/test_client_plain_base.py @@ -24,7 +24,7 @@ import tempfile import x2gobroker.defaults import x2gobroker.client.plain -from nose.tools import * +from nose.tools import assert_equal, assert_true, assert_false class args(): def __init__(self): diff --git a/x2gobroker/tests/test_utils.py b/x2gobroker/tests/test_utils.py index b60d0dc..fc2b66c 100644 --- a/x2gobroker/tests/test_utils.py +++ b/x2gobroker/tests/test_utils.py @@ -18,7 +18,6 @@ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. import unittest -import tempfile # Python X2GoBroker modules import x2gobroker.utils diff --git a/x2gobroker/tests/test_web_plain_base.py b/x2gobroker/tests/test_web_plain_base.py index 7a4c038..49676e3 100644 --- a/x2gobroker/tests/test_web_plain_base.py +++ b/x2gobroker/tests/test_web_plain_base.py @@ -20,7 +20,7 @@ import unittest import tempfile from paste.fixture import TestApp -from nose.tools import * +from nose.tools import assert_equal import tornado.wsgi # Python X2GoBroker modules diff --git a/x2gobroker/tests/test_web_plain_inifile.py b/x2gobroker/tests/test_web_plain_inifile.py index afa4eb1..68e6e64 100644 --- a/x2gobroker/tests/test_web_plain_inifile.py +++ b/x2gobroker/tests/test_web_plain_inifile.py @@ -18,9 +18,9 @@ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. import unittest -import tempfile -from paste.fixture import TestApp -from nose.tools import * +#import tempfile +#from paste.fixture import TestApp +#from nose.tools import * import tornado.wsgi # Python X2GoBroker modules diff --git a/x2gobroker/tests/test_web_plain_zeroconf.py b/x2gobroker/tests/test_web_plain_zeroconf.py index f805aa4..0882b1a 100644 --- a/x2gobroker/tests/test_web_plain_zeroconf.py +++ b/x2gobroker/tests/test_web_plain_zeroconf.py @@ -20,7 +20,7 @@ import unittest import tempfile from paste.fixture import TestApp -from nose.tools import * +from nose.tools import assert_equal import tornado.wsgi # Python X2GoBroker modules diff --git a/x2gobroker/tests/test_web_uccs_zeroconf.py b/x2gobroker/tests/test_web_uccs_zeroconf.py index e1e5782..5492ef7 100644 --- a/x2gobroker/tests/test_web_uccs_zeroconf.py +++ b/x2gobroker/tests/test_web_uccs_zeroconf.py @@ -20,10 +20,9 @@ import unittest import tempfile from paste.fixture import TestApp -from nose.tools import * +from nose.tools import assert_equal import tornado.wsgi import json -import base64 # Python X2GoBroker modules import x2gobroker.defaults @@ -90,7 +89,7 @@ desktop-shell = KDE def test_suite(): - from unittest import TestSuite, makeSuite + from unittest import TestSuite#, makeSuite suite = TestSuite() #suite.addTest(makeSuite(TestX2GoBrokerWebUccsZeroConf)) return suite diff --git a/x2gobroker/utils.py b/x2gobroker/utils.py index efa4a80..4b00434 100644 --- a/x2gobroker/utils.py +++ b/x2gobroker/utils.py @@ -184,7 +184,7 @@ def drop_privileges(uid, gid): os.setuid(running_uid) # Ensure a very conservative umask - old_umask = os.umask(077) + os.umask(077) # set the new user's home directory as $HOME os.environ['HOME'] = pwd.getpwnam(uid).pw_dir @@ -254,11 +254,11 @@ def portscan(addr, port=22): """ ip_proto = 0 try: - dns_query = socket.getaddrinfo(addr, None, socket.AF_INET6) + socket.getaddrinfo(addr, None, socket.AF_INET6) ip_proto = 6 except socket.gaierror: try: - dns_query = socket.getaddrinfo(addr, None, socket.AF_INET) + socket.getaddrinfo(addr, None, socket.AF_INET) ip_proto = 4 except socket.gaierror: # we can't find a valid address for this host, so returning a failure... diff --git a/x2gobroker/web/extras.py b/x2gobroker/web/extras.py index 1e16907..a9fe3f9 100644 --- a/x2gobroker/web/extras.py +++ b/x2gobroker/web/extras.py @@ -47,8 +47,6 @@ class X2GoBrokerItWorks(_RequestHandler): def get(self, *args, **kwargs): - output = "" - self.write('<body><html>') self.write('<h1>X2Go Session Broker</h1>') self.write('<p>It works...</p>') diff --git a/x2gobroker/web/json.py b/x2gobroker/web/json.py index 1288928..96b1fd7 100644 --- a/x2gobroker/web/json.py +++ b/x2gobroker/web/json.py @@ -17,7 +17,6 @@ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # modules -import types import tornado.web from tornado.escape import native_str, parse_qs_bytes @@ -111,7 +110,7 @@ class X2GoBrokerWeb(_RequestHandler): pubkey = self.get_argument('pubkey', default='') task = self.get_argument('task', default='') profile_id = self.get_argument('profile-id', default='') - new_password = self.get_argument('newpass', default='') + #new_password = self.get_argument('newpass', default='') # compat stuff if task == 'listsessions': task = 'listprofiles' diff --git a/x2gobroker/web/plain.py b/x2gobroker/web/plain.py index 591fbc9..d870489 100644 --- a/x2gobroker/web/plain.py +++ b/x2gobroker/web/plain.py @@ -107,7 +107,7 @@ class X2GoBrokerWeb(_RequestHandler): pubkey = self.get_argument('pubkey', default='') task = self.get_argument('task', default='') profile_id = self.get_argument('sid', default='') - new_password = self.get_argument('newpass', default='') + #new_password = self.get_argument('newpass', default='') output = '' diff --git a/x2gobroker/web/uccs.py b/x2gobroker/web/uccs.py index 7a6dc8c..92686f8 100644 --- a/x2gobroker/web/uccs.py +++ b/x2gobroker/web/uccs.py @@ -17,8 +17,6 @@ # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # modules -import re -import base64 import datetime import types import random @@ -133,7 +131,6 @@ class X2GoBrokerWebAPI(tornado.web.RequestHandler): except KeyError: raise tornado.web.HTTPError(401) - cookie = '' logger_broker.debug ('Authenticated as username: {username}, with password: <hidden>'.format(username=username)) ### -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit f4490afac3c2be7648f9dc7ecf307da5df50d1bc Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Mar 26 14:49:49 2015 +0100 fix comment in x2gobroker-authservice --- sbin/x2gobroker-authservice | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/x2gobroker-authservice b/sbin/x2gobroker-authservice index 8eb0ade..c1101cd 100755 --- a/sbin/x2gobroker-authservice +++ b/sbin/x2gobroker-authservice @@ -227,7 +227,7 @@ if __name__ == '__main__': logger_authservice.info(' X2GOBROKER_DEBUG: {value}'.format(value=X2GOBROKER_DEBUG)) logger_authservice.info(' X2GOBROKER_AUTHSERVICE_SOCKET: {value}'.format(value=X2GOBROKER_AUTHSERVICE_SOCKET)) - # check effective UID the broker runs as and complain appropriately... + # check effective UID the AuthService runs as and complain appropriately... if os.geteuid() != 0: logger_authservice.warn('X2Go Session Broker\'s PAM authentication service should run with root privileges to guarantee proper access to all PAM modules.') -- Alioth's /srv/git/code.x2go.org/x2gobroker.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git