[X2Go-Commits] [x2gobroker] 02/02: Fix privilege check for the broker daemon's log directory.

git-admin at x2go.org git-admin at x2go.org
Thu Nov 13 14:05:40 CET 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2gobroker.

commit b20add13550bc9a517faa988f0f3bef2ea56e0fa
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Nov 13 14:04:59 2014 +0100

    Fix privilege check for the broker daemon's log directory.
---
 bin/x2gobroker   |    4 +++-
 debian/changelog |    1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/x2gobroker b/bin/x2gobroker
index f89c92c..af7aaf9 100755
--- a/bin/x2gobroker
+++ b/bin/x2gobroker
@@ -227,13 +227,15 @@ if __name__ == "__main__":
                 print("Insufficent privileges. Cannot create PID file {pidfile} path".format(pidfile=pidfile))
                 print("")
                 sys.exit(-3)
+
+            # the log dir should really be create by distro package maintainers...
             daemon_logdir = os.path.expanduser(cmdline_args.logdir)
             if not os.path.isdir(daemon_logdir):
                 try:
                     os.makedirs(daemon_logdir)
                 except:
                     pass
-            if not os.access(daemon_logdir, os.W_OK):
+            if not (os.access(daemon_logdir, os.W_OK) and os.access(daemon_logdir, os.X_OK)):
                 print("")
                 p.print_usage()
                 print("Insufficent privileges. Cannot create directory for stdout/stderr log files: {logdir}".format(logdir=daemon_logdir))
diff --git a/debian/changelog b/debian/changelog
index ce40f8e..ca36b19 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -197,6 +197,7 @@ x2gobroker (0.0.3.0-0x2go1) UNRELEASED; urgency=low
       the code.
     - Properly set (/var)/run/x2gobroker directory permissions when started
       via systemd.
+    - Fix privilege check for the broker daemon's log directory.
   * debian/control:
     + Provide separate bin:package for SSH brokerage: x2gobroker-ssh.
     + Replace LDAP support with session brokerage support in LONG_DESCRIPTION.

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git


More information about the x2go-commits mailing list