summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorviega1998-06-14 02:13:02 +0000
committerviega1998-06-14 02:13:02 +0000
commit2b3256843447fa2d17cb47fa1aa67462d9f45dd8 (patch)
tree78c1ec10587c91ecb0c1d642b88149516dcb5ea0
parenta4fafc57a8cbb61e1f106a93b4b18fa9e4ad2fb2 (diff)
downloadmailman-2b3256843447fa2d17cb47fa1aa67462d9f45dd8.tar.gz
mailman-2b3256843447fa2d17cb47fa1aa67462d9f45dd8.tar.zst
mailman-2b3256843447fa2d17cb47fa1aa67462d9f45dd8.zip
-rw-r--r--Mailman/Crypt.py6
-rw-r--r--Mailman/Defaults.py.in6
-rw-r--r--modules/mm_crypt.py6
-rw-r--r--modules/mm_defaults.py.in6
4 files changed, 20 insertions, 4 deletions
diff --git a/Mailman/Crypt.py b/Mailman/Crypt.py
index 19783ec0b..6f568464c 100644
--- a/Mailman/Crypt.py
+++ b/Mailman/Crypt.py
@@ -1,6 +1,8 @@
-try:
+import mm_cfg
+
+if mm_cfg.USE_CRYPT:
from crypt import *
-except ImportError:
+else:
def crypt(string, seed):
import md5
return md5.new(string).digest()
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in
index 8dc8a8b20..5be909032 100644
--- a/Mailman/Defaults.py.in
+++ b/Mailman/Defaults.py.in
@@ -44,6 +44,12 @@ MAILMAN_OWNER = 'mailman-owner@%s' % DEFAULT_HOST_NAME
# System ceiling on number of batches into which deliveries are divided:
MAX_SPAWNS = 40
+# 1 to use crypt for passwords instead of md5.
+# Crypt may not work on all python installs.
+# Don't change this value once you have lists running...
+# In fact, you should just let configure set this one and leave it alone.
+USE_CRYPT = 1
+
# General Defaults #
DEFAULT_FILTER_PROG = ''
diff --git a/modules/mm_crypt.py b/modules/mm_crypt.py
index 19783ec0b..6f568464c 100644
--- a/modules/mm_crypt.py
+++ b/modules/mm_crypt.py
@@ -1,6 +1,8 @@
-try:
+import mm_cfg
+
+if mm_cfg.USE_CRYPT:
from crypt import *
-except ImportError:
+else:
def crypt(string, seed):
import md5
return md5.new(string).digest()
diff --git a/modules/mm_defaults.py.in b/modules/mm_defaults.py.in
index 8dc8a8b20..5be909032 100644
--- a/modules/mm_defaults.py.in
+++ b/modules/mm_defaults.py.in
@@ -44,6 +44,12 @@ MAILMAN_OWNER = 'mailman-owner@%s' % DEFAULT_HOST_NAME
# System ceiling on number of batches into which deliveries are divided:
MAX_SPAWNS = 40
+# 1 to use crypt for passwords instead of md5.
+# Crypt may not work on all python installs.
+# Don't change this value once you have lists running...
+# In fact, you should just let configure set this one and leave it alone.
+USE_CRYPT = 1
+
# General Defaults #
DEFAULT_FILTER_PROG = ''