diff options
author | tkikuchi <> | 2005-12-13 00:48:44 +0000 |
---|---|---|
committer | tkikuchi <> | 2005-12-13 00:48:44 +0000 |
commit | ff48e0ff7992c887840b65ea4c30687ab79a056a (patch) | |
tree | 607321a924b7aa17a60ba67edd83ab1edbd6def9 /Mailman | |
parent | 574ee397c24044689ae667ef4bd58f22d33ca5b0 (diff) | |
download | mailman2-ff48e0ff7992c887840b65ea4c30687ab79a056a.tar.gz mailman2-ff48e0ff7992c887840b65ea4c30687ab79a056a.tar.xz mailman2-ff48e0ff7992c887840b65ea4c30687ab79a056a.zip |
SF bug tracker 1378270. Fix aliases permission check in Postfix.py.
Diffstat (limited to '')
-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 b2d433e4..cee0eb1d 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 |