diff options
| author | viega | 1998-05-30 16:15:08 +0000 |
|---|---|---|
| committer | viega | 1998-05-30 16:15:08 +0000 |
| commit | 28f8e182ad5ac9eabae4a9fb6aed6b8ec3db71e3 (patch) | |
| tree | d585587983618c2552c4cbc24b2ef9b73115b44d /Mailman/SecurityManager.py | |
| parent | 801e9a70e41c85b8e91fd074020166944e419363 (diff) | |
| download | mailman-28f8e182ad5ac9eabae4a9fb6aed6b8ec3db71e3.tar.gz mailman-28f8e182ad5ac9eabae4a9fb6aed6b8ec3db71e3.tar.zst mailman-28f8e182ad5ac9eabae4a9fb6aed6b8ec3db71e3.zip | |
Added mm_crypt, which trys to import crypt, and provides a wrapper
interface to an md5 digest if the import fails. This way, we don't
have to tell people to recompile python if they compiled it out of the
box. (since crypt is no longer in by default).
mm_security now uses mm_crypt instead of crypt.
Diffstat (limited to 'Mailman/SecurityManager.py')
| -rw-r--r-- | Mailman/SecurityManager.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Mailman/SecurityManager.py b/Mailman/SecurityManager.py index f487f4c13..be7f75130 100644 --- a/Mailman/SecurityManager.py +++ b/Mailman/SecurityManager.py @@ -18,7 +18,7 @@ """Handle passwords and sanitize approved messages.""" -import crypt, types, string, os +import mm_crypt, types, string, os import mm_err, mm_utils, mm_cfg # TBD: is this the best location for the site password? @@ -29,7 +29,7 @@ class SecurityManager: def SetSiteAdminPassword(self, pw): old = os.umask(0022) f = open(SITE_PW_FILE, "w+") - f.write(crypt.crypt(pw, mm_utils.GetRandomSeed())) + f.write(mm_crypt.crypt(pw, mm_utils.GetRandomSeed())) f.close() os.umask(old) @@ -38,7 +38,7 @@ class SecurityManager: f = open(SITE_PW_FILE, "r+") pw = f.read() f.close() - return crypt.crypt(str, pw) == pw + return mm_crypt.crypt(str, pw) == pw # There probably is no site admin password if there was an exception except: return 0 @@ -55,7 +55,7 @@ class SecurityManager: if self.CheckSiteAdminPassword(pw): return 1 return ((type(pw) == types.StringType) and - (crypt.crypt(pw, self.password) == self.password)) + (mm_crypt.crypt(pw, self.password) == self.password)) def ConfirmAdminPassword(self, pw): if(not self.ValidAdminPassword(pw)): |
