From de688105eecfe0c08ee06bb2276d250d4224f0d9 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Tue, 4 Sep 2001 16:45:16 +0000 Subject: Ensure that the data/aliases* files are written at least rw-rw-xxx --- bin/genaliases | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin') diff --git a/bin/genaliases b/bin/genaliases index 782788482..578923c07 100644 --- a/bin/genaliases +++ b/bin/genaliases @@ -29,6 +29,7 @@ Options: """ import sys +import os import getopt import dbhash import fcntl @@ -68,6 +69,9 @@ def main(): lock = Postfix.makelock() lock.lock() lockfp = None + # Make sure the files are created rw-rw-xxx; it should be okay to be world + # readable. + omask = os.umask(002) try: # Overwrite the current file contents, since we're going to be adding # all new entries. See the discussion in Mailman/MTA/Postfix.py for @@ -82,6 +86,7 @@ def main(): db.sync() fp.close() finally: + os.umask(omask) if lockfp: fcntl.flock(lockfp.fileno(), fcntl.LOCK_UN) lockfp.close() -- cgit v1.2.3-70-g09d2