diff options
| author | msapiro | 2006-02-05 04:43:35 +0000 |
|---|---|---|
| committer | msapiro | 2006-02-05 04:43:35 +0000 |
| commit | 3aac0f28e0ce4843a7ebc0da84007c4e817c6290 (patch) | |
| tree | 1fc896623ec3e849dc8a27cc844142f521876ec8 /Mailman/Queue | |
| parent | 06934160815d2f92c8c8b969758c7dfceb0e47de (diff) | |
| download | mailman-3aac0f28e0ce4843a7ebc0da84007c4e817c6290.tar.gz mailman-3aac0f28e0ce4843a7ebc0da84007c4e817c6290.tar.zst mailman-3aac0f28e0ce4843a7ebc0da84007c4e817c6290.zip | |
Set umask for creation of bounce-events queue file.
Diffstat (limited to 'Mailman/Queue')
| -rw-r--r-- | Mailman/Queue/BounceRunner.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Mailman/Queue/BounceRunner.py b/Mailman/Queue/BounceRunner.py index 76a304708..3fe09ca3f 100644 --- a/Mailman/Queue/BounceRunner.py +++ b/Mailman/Queue/BounceRunner.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2004 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2006 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -12,7 +12,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. """Bounce queue runner.""" @@ -88,7 +89,11 @@ class BounceMixin: def _queue_bounces(self, listname, addrs, msg): today = time.localtime()[:3] if self._bounce_events_fp is None: - self._bounce_events_fp = open(self._bounce_events_file, 'a+b') + omask = os.umask(006) + try: + self._bounce_events_fp = open(self._bounce_events_file, 'a+b') + finally: + os.umask(omask) for addr in addrs: cPickle.dump((listname, addr, today, msg), self._bounce_events_fp, 1) |
