diff options
| author | bwarsaw | 2001-09-04 16:45:16 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-09-04 16:45:16 +0000 |
| commit | de688105eecfe0c08ee06bb2276d250d4224f0d9 (patch) | |
| tree | cb65ba479826b99e26276d3fff265e6e56fc30ef | |
| parent | 2a46068de823bd2ec881c4618df9901a2db76547 (diff) | |
| download | mailman-de688105eecfe0c08ee06bb2276d250d4224f0d9.tar.gz mailman-de688105eecfe0c08ee06bb2276d250d4224f0d9.tar.zst mailman-de688105eecfe0c08ee06bb2276d250d4224f0d9.zip | |
Ensure that the data/aliases* files are written at least rw-rw-xxx
| -rw-r--r-- | bin/genaliases | 5 |
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() |
