The branch, tornado has been updated
via d1b123d29807d11997c79697ac7b998264ed2fea (commit)
from 83b347f272687471a93d46449704893256ca88de (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d1b123d29807d11997c79697ac7b998264ed2fea
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de&…
[View More]gt;
Date: Wed Mar 6 00:35:11 2013 +0100
only generate http headers on GET method requests
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/web/html.py | 2 +-
x2gobroker/web/plain.py | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
The diff of changes is:
diff --git a/x2gobroker/web/html.py b/x2gobroker/web/html.py
index 9992936..a604239 100644
--- a/x2gobroker/web/html.py
+++ b/x2gobroker/web/html.py
@@ -65,6 +65,7 @@ $output
self.add_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):
@@ -92,7 +93,6 @@ $output
new_password = self.get_argument('newpass', default='')
output = ''
- self._gen_http_header()
if broker_backend.check_access(username=username, password=password, authid=authid):
diff --git a/x2gobroker/web/plain.py b/x2gobroker/web/plain.py
index a3a6c16..006a539 100644
--- a/x2gobroker/web/plain.py
+++ b/x2gobroker/web/plain.py
@@ -43,6 +43,7 @@ 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(404)
@@ -61,6 +62,10 @@ class X2GoBrokerWeb(tornado.web.RequestHandler):
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
+ if not broker_backend.is_enabled():
+ raise tornado.web.HTTPError(404)
+
# set the client address for the broker backend
ip = self.request.remote_ip
if ip:
@@ -71,10 +76,6 @@ class X2GoBrokerWeb(tornado.web.RequestHandler):
logger_error.error('client could not provide an IP address, pretending: 404 Not Found')
raise tornado.web.HTTPError(404)
- # if the broker backend is disabled in the configuration, pretend to have nothing on offer
- if not broker_backend.is_enabled():
- raise tornado.web.HTTPError(404)
-
username = self.get_argument('user', default='')
password = self.get_argument('password', default='')
cookie = self.get_argument('cookie', default='')
@@ -83,7 +84,6 @@ class X2GoBrokerWeb(tornado.web.RequestHandler):
new_password = self.get_argument('newpass', default='')
output = ''
- self._gen_http_header()
logger_broker.debug ('username: {username}, password: {password}, task: {task}, profile_id: {profile_id}'.format(username=username, password='XXXXX', task=task, profile_id=profile_id))
if broker_backend.check_access(username=username, password=password, cookie=cookie):
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, tornado has been updated
via 83b347f272687471a93d46449704893256ca88de (commit)
from 1333f57a70b1c03a127d6995cdc0ddd171c19b84 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 83b347f272687471a93d46449704893256ca88de
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de&…
[View More]gt;
Date: Wed Mar 6 00:19:03 2013 +0100
fix auth-mech and agent-query-mode detection
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/brokers/base_broker.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
The diff of changes is:
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index 4f03e81..9001039 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
@@ -433,7 +433,7 @@ class X2GoBroker(object):
_default_auth_mech = "pam"
_auth_mech = ""
- if self.config.has_value(self.backend_name, 'auth-mech'):
+ if self.config.has_value(self.backend_name, 'auth-mech') and self.config.get_value(self.backend_name, 'auth-mech'):
_auth_mech = self.config.get_value(self.backend_name, 'auth-mech').lower()
logger_broker.debug('base_broker.X2GoBroker.get_authentication_mechanism(): found auth-mech in backend config section »{backend}«: {value}. This one has precendence over the default value.'.format(backend=self.backend_name, value=_auth_mech))
@@ -454,7 +454,7 @@ class X2GoBroker(object):
"""
_default_agent_query_mode = "LOCAL"
_agent_query_mode = ""
- if self.config.has_value(self.backend_name, 'agent-query-mode'):
+ if self.config.has_value(self.backend_name, 'agent-query-mode') and self.config.get_value(self.backend_name, 'agent-query-mode'):
_agent_query_mode = self.config.get_value(self.backend_name, 'agent-query-mode').lower()
logger_broker.debug('base_broker.X2GoBroker.get_agent_query_mode(): found agent-query-mode in backend config section »{backend}«: {value}. This one has precendence over the default value.'.format(backend=self.backend_name, value=_agent_query_mode))
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, tornado has been updated
via f395518f6ce01794e96aae35014225d29c594505 (commit)
from eb322fcd5727c3e9d6f80da831f9e0f177f589c9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f395518f6ce01794e96aae35014225d29c594505
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de&…
[View More]gt;
Date: Tue Mar 5 23:34:57 2013 +0100
fix logging
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/loggers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
The diff of changes is:
diff --git a/x2gobroker/loggers.py b/x2gobroker/loggers.py
index fa0e3b1..e7eabe0 100644
--- a/x2gobroker/loggers.py
+++ b/x2gobroker/loggers.py
@@ -71,7 +71,7 @@ else:
logger_error.addHandler(stderr_handler)
logger_error.propagate = 0
-def tornado_log_request(self, handler):
+def tornado_log_request(handler):
"""\
Function for overriding the log_request method in
C{tornado.web.RequestHandler}.
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, tornado has been updated
via eb322fcd5727c3e9d6f80da831f9e0f177f589c9 (commit)
from dcdbce376f33afe485535d4bca6cb39f06b91c12 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit eb322fcd5727c3e9d6f80da831f9e0f177f589c9
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de&…
[View More]gt;
Date: Tue Mar 5 22:54:38 2013 +0100
re-enable key deletion in base_broker.py
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/brokers/base_broker.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
The diff of changes is:
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index 6062815..4f03e81 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
@@ -871,13 +871,13 @@ class X2GoBroker(object):
selected_session.update({
'authentication_privkey': privkey,
})
- #x2gobroker.agent.delete_authorized_key(username=username,
- # pubkey_hash=pubkey,
- # authorized_keys_file=self.get_authorized_keys_file(profile_id),
- # query_mode=agent_query_mode,
- # remote_agent=remote_agent,
- # delay_deletion=60,
- #),
+ x2gobroker.agent.delete_authorized_key(username=username,
+ pubkey_hash=pubkey,
+ authorized_keys_file=self.get_authorized_keys_file(profile_id),
+ query_mode=agent_query_mode,
+ remote_agent=remote_agent,
+ delay_deletion=20,
+ ),
return selected_session
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, tornado has been updated
via dcdbce376f33afe485535d4bca6cb39f06b91c12 (commit)
from ea189372b4d143c6937ffb5a682a9ba0c3eb281c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit dcdbce376f33afe485535d4bca6cb39f06b91c12
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de&…
[View More]gt;
Date: Tue Mar 5 22:53:44 2013 +0100
fix x2gobroker-agent delkey task
-----------------------------------------------------------------------
Summary of changes:
lib/x2gobroker-agent.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
The diff of changes is:
diff --git a/lib/x2gobroker-agent.pl b/lib/x2gobroker-agent.pl
index 52a26d5..12f38d2 100755
--- a/lib/x2gobroker-agent.pl
+++ b/lib/x2gobroker-agent.pl
@@ -88,7 +88,7 @@ sub DelAuthKey
{
$authkeyfile = "$home/$authkeyfile";
}
- system("su - $uid -c \"sed -e s\!'$pubkey\\n'\!''\! -e '/^\$/d' -i $authkeyfile\" 1>/dev/null 2>/dev/null");
+ system("su - $uid -c \"sed -e s\!'$pubkey'\!''\! -e '/^\$/d' -i $authkeyfile\" 1>/dev/null 2>/dev/null");
}
$< = $>;
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, tornado has been updated
via ea189372b4d143c6937ffb5a682a9ba0c3eb281c (commit)
from 63ca4fa3a6bccff85f1ebc51548cd8a1b95c62af (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ea189372b4d143c6937ffb5a682a9ba0c3eb281c
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de&…
[View More]gt;
Date: Tue Mar 5 22:42:09 2013 +0100
allow absence of port number in remote_agent dict
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/agent.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
The diff of changes is:
diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py
index 6b4a251..9b63f00 100644
--- a/x2gobroker/agent.py
+++ b/x2gobroker/agent.py
@@ -109,7 +109,10 @@ def call_remote_broker_agent(username, mode, cmdline_args=[], remote_agent=None)
remote_username = x2gobroker.defaults.X2GOBROKER_AGENT_USER
remote_hostname = remote_agent[u'hostname']
- remote_port = int(remote_agent[u'port'])
+ if remote_agent.has_key(u'port'):
+ remote_port = int(remote_agent[u'port'])
+ else:
+ remote_port = 22
# now, connect and use paramiko Client to negotiate SSH2 across the connection
try:
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, tornado has been updated
via 63ca4fa3a6bccff85f1ebc51548cd8a1b95c62af (commit)
from f744b3940f0b8cf705b9add326ed67703ee07243 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 63ca4fa3a6bccff85f1ebc51548cd8a1b95c62af
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de&…
[View More]gt;
Date: Tue Mar 5 22:37:40 2013 +0100
partially revert ff5809f40d1735d77dc0f97936934c0f9927f433
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/agent.py | 1 +
1 file changed, 1 insertion(+)
The diff of changes is:
diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py
index 4b14ce3..6b4a251 100644
--- a/x2gobroker/agent.py
+++ b/x2gobroker/agent.py
@@ -122,6 +122,7 @@ def call_remote_broker_agent(username, mode, cmdline_args=[], remote_agent=None)
ssh_transport = client.get_transport()
if ssh_transport and ssh_transport.is_authenticated():
cmd = ' '.join(cmd_line)
+ cmd = 'sh -c \"{cmd}\"'.format(cmd=cmd)
logger_broker.debug('Executing agent command on remote host ({remote_agent}): {cmd}'.format(remote_agent=remote_agent['hostname'], cmd=cmd))
(stdin, stdout, stderr) = client.exec_command(cmd)
result = stdout.read().split('\n')
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, tornado has been updated
via f744b3940f0b8cf705b9add326ed67703ee07243 (commit)
from ff5809f40d1735d77dc0f97936934c0f9927f433 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f744b3940f0b8cf705b9add326ed67703ee07243
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de&…
[View More]gt;
Date: Tue Mar 5 22:35:56 2013 +0100
fixed delayed execution of agent.delete_authorize_key()
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/agent.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
The diff of changes is:
diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py
index 18980a6..4b14ce3 100644
--- a/x2gobroker/agent.py
+++ b/x2gobroker/agent.py
@@ -48,7 +48,6 @@ class delayed_execution(threading.Thread):
while i < self.delay:
time.sleep(1)
i += 1
- logger_broker.debug(i)
self.agent_func(**self.kwargs)
@@ -228,7 +227,7 @@ def delete_authorized_key(username, pubkey_hash, authorized_keys_file='%h/.x2go/
_hostname = remote_agent['hostname']
if delay_deletion > 0:
- delayed_execution(delete_authorized_key, delay=delay_deletion, username=username, authorized_keys_file=authorized_keys_file, query_mode=query_mode, remote_agent=remote_agent, )
+ delayed_execution(delete_authorized_key, delay=delay_deletion, username=username, pubkey_hash=pubkey_hash, authorized_keys_file=authorized_keys_file, query_mode=query_mode, remote_agent=remote_agent, )
logger_broker.debug('Scheduled deletion of authorized key in {delay}s: user={user}, host={host}'.format(delay=delay_deletion, user=username, host=_hostname))
else:
if query_mode.upper() == u'LOCAL':
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]
The branch, tornado has been updated
via ff5809f40d1735d77dc0f97936934c0f9927f433 (commit)
from 30c5d7913cd73b6172673983ee37160f3a5c9f71 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ff5809f40d1735d77dc0f97936934c0f9927f433
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de&…
[View More]gt;
Date: Tue Mar 5 22:08:49 2013 +0100
try fixing delayed execution...
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/agent.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
The diff of changes is:
diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py
index b32489a..18980a6 100644
--- a/x2gobroker/agent.py
+++ b/x2gobroker/agent.py
@@ -44,7 +44,11 @@ class delayed_execution(threading.Thread):
self.start()
def run(self):
- time.sleep(self.delay)
+ i = 0
+ while i < self.delay:
+ time.sleep(1)
+ i += 1
+ logger_broker.debug(i)
self.agent_func(**self.kwargs)
@@ -119,7 +123,6 @@ def call_remote_broker_agent(username, mode, cmdline_args=[], remote_agent=None)
ssh_transport = client.get_transport()
if ssh_transport and ssh_transport.is_authenticated():
cmd = ' '.join(cmd_line)
- cmd = 'sh -c \"{cmd}\"'.format(cmd=cmd)
logger_broker.debug('Executing agent command on remote host ({remote_agent}): {cmd}'.format(remote_agent=remote_agent['hostname'], cmd=cmd))
(stdin, stdout, stderr) = client.exec_command(cmd)
result = stdout.read().split('\n')
@@ -225,7 +228,7 @@ def delete_authorized_key(username, pubkey_hash, authorized_keys_file='%h/.x2go/
_hostname = remote_agent['hostname']
if delay_deletion > 0:
- delayed_execution(delete_authorized_key, delay=60, username=username, authorized_keys_file=authorized_keys_file, query_mode=query_mode, remote_agent=remote_agent, )
+ delayed_execution(delete_authorized_key, delay=delay_deletion, username=username, authorized_keys_file=authorized_keys_file, query_mode=query_mode, remote_agent=remote_agent, )
logger_broker.debug('Scheduled deletion of authorized key in {delay}s: user={user}, host={host}'.format(delay=delay_deletion, user=username, host=_hostname))
else:
if query_mode.upper() == u'LOCAL':
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
[View Less]