diff options
| author | tkikuchi | 2005-12-13 00:55:48 +0000 |
|---|---|---|
| committer | tkikuchi | 2005-12-13 00:55:48 +0000 |
| commit | 7ceb6ebe757a31905fa2b5891aa19fe7bc9a2ed8 (patch) | |
| tree | 515df1692beebf9528a41c1861682e08d6c34e75 /Mailman/MTA/Postfix.py | |
| parent | 1e15a968a187bdb42904467349c65be89ac0959d (diff) | |
| download | mailman-7ceb6ebe757a31905fa2b5891aa19fe7bc9a2ed8.tar.gz mailman-7ceb6ebe757a31905fa2b5891aa19fe7bc9a2ed8.tar.zst mailman-7ceb6ebe757a31905fa2b5891aa19fe7bc9a2ed8.zip | |
Diffstat (limited to 'Mailman/MTA/Postfix.py')
| -rw-r--r-- | Mailman/MTA/Postfix.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Mailman/MTA/Postfix.py b/Mailman/MTA/Postfix.py index b2d433e4f..cee0eb1d3 100644 --- a/Mailman/MTA/Postfix.py +++ b/Mailman/MTA/Postfix.py @@ -339,7 +339,7 @@ def checkperms(state): owner = pwd.getpwuid(stat[ST_UID])[0] except KeyError: owner = 'uid %d' % stat[ST_UID] - print _('%(dbfile)s owned by %(owner)s (must be owned by %(user)s') + print _('%(dbfile)s owned by %(owner)s (must be owned by %(user)s'), state.ERRORS += 1 if state.FIX: print _('(fixing)') @@ -348,3 +348,12 @@ def checkperms(state): os.chown(dbfile, uid, gid) else: print + if stat and (stat[ST_MODE] & targetmode) <> targetmode: + state.ERRORS += 1 + octmode = oct(stat[ST_MODE]) + print _('%(dbfile)s permissions must be 066x (got %(octmode)s)'), + if state.FIX: + print _('(fixing)') + os.chmod(dbfile, stat[ST_MODE] | targetmode) + else: + print |
