diff options
| author | bwarsaw | 1999-07-09 23:38:12 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-07-09 23:38:12 +0000 |
| commit | 6c9c70a45f2fd5a8c913fed6044bd4a8ecf0a1c8 (patch) | |
| tree | ce5f6c67c3f6d31437e7e775f38cbe92af14af1b /Mailman/SecurityManager.py | |
| parent | 4b28f84f1b76e508c8d9e88ad0efaeefc462d5a2 (diff) | |
| download | mailman-6c9c70a45f2fd5a8c913fed6044bd4a8ecf0a1c8.tar.gz mailman-6c9c70a45f2fd5a8c913fed6044bd4a8ecf0a1c8.tar.zst mailman-6c9c70a45f2fd5a8c913fed6044bd4a8ecf0a1c8.zip | |
Diffstat (limited to 'Mailman/SecurityManager.py')
| -rw-r--r-- | Mailman/SecurityManager.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Mailman/SecurityManager.py b/Mailman/SecurityManager.py index 289762834..917b40839 100644 --- a/Mailman/SecurityManager.py +++ b/Mailman/SecurityManager.py @@ -35,11 +35,9 @@ SITE_PW_FILE = os.path.join(mm_cfg.DATA_DIR, 'adm.pw') class SecurityManager: def SetSiteAdminPassword(self, pw): - old = os.umask(0022) - f = open(SITE_PW_FILE, "w+") - f.write(Crypt.crypt(pw, Utils.GetRandomSeed())) - f.close() - os.umask(old) + fp = Utils.open_ex(SITE_PW_FILE, 'w', perms=0640) + fp.write(Crypt.crypt(pw, Utils.GetRandomSeed())) + fp.close() def CheckSiteAdminPassword(self, str): try: |
