summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/genaliases5
1 files changed, 5 insertions, 0 deletions
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()