From: Anthony Towns Date: Mon, 18 Jun 2007 18:16:22 +0000 (+0100) Subject: * daklib/logging.py: Set umask to not exclude group-writability X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d572d9a0c28aaed9198883533d8e0b2d8a588bfc;p=dak * daklib/logging.py: Set umask to not exclude group-writability so we don't get reminded at the start of each month. Thanks to Random J. --- diff --git a/ChangeLog b/ChangeLog index 8f11c89f..aefe1566 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-06-18 Anthony Towns + + * daklib/logging.py: Set umask to not exclude group-writability + so we don't get reminded at the start of each month. Thanks to + Random J. + 2007-06-18 Anthony Towns * config/debian/apt.conf, config/debian/apt.conf.stable, diff --git a/daklib/logging.py b/daklib/logging.py index 9b27aeb7..d7455502 100644 --- a/daklib/logging.py +++ b/daklib/logging.py @@ -39,13 +39,16 @@ class Logger: if not os.path.exists(logdir): umask = os.umask(00000) os.makedirs(logdir, 02775) + os.umask(umask) # Open the logfile logfilename = "%s/%s" % (logdir, time.strftime("%Y-%m")) logfile = None if debug: logfile = sys.stderr else: + umask = os.umask(00002) logfile = utils.open_file(logfilename, 'a') + os.umask(umask) self.logfile = logfile # Log the start of the program user = pwd.getpwuid(os.getuid())[0]