[X2Go-Commits] x2gobroker.git - master (branch) updated: 0.0.2.3-130-g548c779

X2Go dev team git-admin at x2go.org
Fri Dec 20 11:18:47 CET 2013


The branch, master has been updated
       via  548c7792bfa2be3b2f067cdf747555a0321f4db9 (commit)
      from  fc8d5d8412bcef24ae31bc571788baf0605cee30 (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 548c7792bfa2be3b2f067cdf747555a0321f4db9
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Dec 20 11:18:42 2013 +0100

    Let x2gobroker-authservice take care of tidying up its own socket file.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog            |    1 +
 sbin/x2gobroker-authservice |    7 +++++++
 2 files changed, 8 insertions(+)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 0e2cf9d..8d2158a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -73,6 +73,7 @@ x2gobroker (0.0.3.0-0x2go1) UNRELEASED; urgency=low
       location of the authservice socket file.
     - Detect RUNDIR in x2gobroker Python module and use it for the default
       location of the authservice socket file.
+    - Let x2gobroker-authservice take care of tidying up its own socket file.
   * debian/control:
     + Replace LDAP support with session brokerage support in LONG_DESCRIPTION.
     + Fix SYNOPSIS texts.
diff --git a/sbin/x2gobroker-authservice b/sbin/x2gobroker-authservice
index 251de86..199cab4 100755
--- a/sbin/x2gobroker-authservice
+++ b/sbin/x2gobroker-authservice
@@ -31,6 +31,7 @@ import socket
 import getpass
 import logging.config
 import pam
+import signal
 
 if os.path.isdir('/run'):
     RUNDIR = '/run'
@@ -105,6 +106,10 @@ def loop():
     asyncore.loop()
 
 
+def sigterm_handler():
+    os.remove(X2GOBROKER_AUTHSERVICE_SOCKET)
+
+
 # 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'):
@@ -128,6 +133,7 @@ if os.environ.has_key('X2GOBROKER_AUTHSERVICE_SOCKET'):
 else:
     X2GOBROKER_AUTHSERVICE_SOCKET="{run}/x2gobroker/x2gobroker-authservice.socket".format(run=RUNDIR)
 
+
 # standalone daemon mode (x2gobroker-authservice as daemon) or interactive mode (called from the cmdline)?
 if getpass.getuser() in (X2GOBROKER_DAEMON_USER, 'root'):
 
@@ -225,6 +231,7 @@ if __name__ == '__main__':
                 daemon_logdir += '/'
 
     socket_file = cmdline_args.socket_file
+    signal.signal(signal.SIGTERM, sigterm_handler)
     AuthService(socket_file, owner=cmdline_args.owner, group_owner=cmdline_args.group, permissions=cmdline_args.permissions)
     try:
         if CAN_DAEMONIZE and cmdline_args.daemonize:


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