Projects
Kolab:3.4
pykolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 63
View file
pykolab-0.6.11-saslauthd-logger-permissions.patch
Changed
@@ -1,14 +1,7 @@ -commit 8a2d66c45f1de4a1c7326372a96a022eae202171 -Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> -Date: Thu Feb 13 12:04:24 2014 +0100 - - Make sure permissions on log files are OK, and saslauthd itself switches uid/gid too - -diff --git a/pykolab/logger.py b/pykolab/logger.py -index 6f82d5d..10fa8a2 100644 ---- a/pykolab/logger.py -+++ b/pykolab/logger.py -@@ -37,6 +37,8 @@ class Logger(logging.Logger): +diff -ur pykolab-0.6.11.orig/pykolab/logger.py pykolab-0.6.11/pykolab/logger.py +--- pykolab-0.6.11.orig/pykolab/logger.py 2014-01-28 12:33:07.000000000 +0100 ++++ pykolab-0.6.11/pykolab/logger.py 2014-02-14 15:49:34.519321952 +0100 +@@ -37,6 +37,8 @@ debuglevel = 0 fork = False loglevel = logging.CRITICAL @@ -17,7 +10,7 @@ if hasattr(sys, 'argv'): for arg in sys.argv: -@@ -66,6 +68,26 @@ class Logger(logging.Logger): +@@ -66,6 +68,26 @@ else: loglevel = logging.DEBUG @@ -44,8 +37,13 @@ def __init__(self, *args, **kw): if kw.has_key('name'): name = kw['name'] -@@ -91,23 +113,81 @@ class Logger(logging.Logger): +@@ -89,25 +111,86 @@ + else: + self.logfile = '/var/log/kolab/pykolab.log' ++ group_gid = 0 ++ user_uid = 0 ++ # Make sure (read: attempt to change) the permissions try: - (ruid, euid, suid) = os.getresuid() @@ -53,9 +51,6 @@ - except AttributeError, errmsg: - ruid = os.getuid() - rgid = os.getgid() -- -- if ruid == 0 or rgid == 0: -- if os.path.isfile(self.logfile): + try: + (ruid, euid, suid) = os.getresuid() + (rgid, egid, sgid) = os.getresgid() @@ -112,7 +107,9 @@ + ) + + sys.exit(1) -+ + +- if ruid == 0 or rgid == 0: +- if os.path.isfile(self.logfile): try: os.chown( self.logfile, @@ -138,10 +135,18 @@ # Make sure the log file exists try: -diff --git a/saslauthd/__init__.py b/saslauthd/__init__.py -index 90a7413..69accce 100644 ---- a/saslauthd/__init__.py -+++ b/saslauthd/__init__.py +@@ -137,7 +220,7 @@ + self.console_stdout.close() + self.removeHandler(self.console_stdout) + +- def debug(self, msg, level=1): ++ def debug(self, msg, level=1, *args, **kw): + self.setLevel(self.loglevel) + # Work around other applications not using various levels of debugging + if not self.name.startswith('pykolab') and not self.debuglevel == 9: +diff -ur pykolab-0.6.11.orig/saslauthd/__init__.py pykolab-0.6.11/saslauthd/__init__.py +--- pykolab-0.6.11.orig/saslauthd/__init__.py 2014-01-28 12:33:07.000000000 +0100 ++++ pykolab-0.6.11/saslauthd/__init__.py 2014-02-14 15:49:27.407336108 +0100 @@ -28,7 +28,9 @@ from optparse import OptionParser from ConfigParser import SafeConfigParser @@ -152,7 +157,7 @@ import shutil import sys import time -@@ -107,6 +109,79 @@ class SASLAuthDaemon(object): +@@ -107,6 +109,79 @@ exitcode = 0 try:
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +pykolab (0.6.11-0~kolab12) unstable; urgency=low + + * Fix logger + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Fri, 14 Feb 2014 20:00:00 +0100 + pykolab (0.6.11-0~kolab11) unstable; urgency=low * Make sure the logger and saslauthd drop permissions too
View file
pykolab.dsc
Changed
@@ -2,7 +2,7 @@ Source: pykolab Binary: pykolab, kolab-cli, kolab-conf, kolab-saslauthd, kolab-server, kolab-telemetry, kolab-xml, wallace Architecture: all -Version: 0.6.11-0~kolab11 +Version: 0.6.11-0~kolab12 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.