summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mailman/Cgi/create.py2
-rw-r--r--Mailman/bin/mmsitepass.py14
-rw-r--r--Makefile.in4
3 files changed, 14 insertions, 6 deletions
diff --git a/Mailman/Cgi/create.py b/Mailman/Cgi/create.py
index 0ebe7b9f6..ed29e7f59 100644
--- a/Mailman/Cgi/create.py
+++ b/Mailman/Cgi/create.py
@@ -161,7 +161,7 @@ def process_request(doc, cgidata):
# We've got all the data we need, so go ahead and try to create the list
mlist = MailList.MailList()
try:
- pw = passwords(password, config.PASSWORD_SCHEME)
+ pw = passwords.make_secret(password, config.PASSWORD_SCHEME)
try:
mlist.Create(fqdn_listname, owner, pw, langs)
except Errors.EmailAddressError, s:
diff --git a/Mailman/bin/mmsitepass.py b/Mailman/bin/mmsitepass.py
index 0d986bf6a..47f48b083 100644
--- a/Mailman/bin/mmsitepass.py
+++ b/Mailman/bin/mmsitepass.py
@@ -52,7 +52,7 @@ Set the list creator password instead of the site password. The list
creator is authorized to create and remove lists, but does not have
the total power of the site administrator."""))
parser.add_option('-p', '--password-scheme',
- default=config.PASSWORD_SCHEME, type='string',
+ default='', type='string',
help=_("""\
Specify the RFC 2307 style hashing scheme for passwords included in the
output. Use -P to get a list of supported schemes, which are
@@ -70,15 +70,23 @@ case-insensitive."""))
for label in passwords.SCHEMES:
print label.upper()
sys.exit(0)
- if opts.password_scheme.lower() not in passwords.SCHEMES:
- parser.error(_('Invalid password scheme'))
return parser, opts, args
+def check_password_scheme(parser, password_scheme):
+ # shoule be checked after config is loaded.
+ if password_scheme == '':
+ password_scheme = config.PASSWORD_SCHEME
+ if password_scheme.lower() not in passwords.SCHEMES:
+ parser.error(_('Invalid password scheme'))
+ return password_scheme
+
+
def main():
parser, opts, args = parseargs()
initialize(opts.config)
+ opts.password_scheme = check_password_scheme(parser, opts.password_scheme)
if args:
password = args[0]
else:
diff --git a/Makefile.in b/Makefile.in
index 441da7462..c9f1bb6e4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -45,11 +45,11 @@ OPT= @OPT@
CFLAGS= @CFLAGS@ $(OPT) $(DEFS)
VAR_DIRS= \
- logs archives lists locks data spam qfiles \
+ etc logs archives lists locks data spam qfiles \
archives/private archives/public
ARCH_INDEP_DIRS= \
- bin etc templates scripts cron pythonlib \
+ bin templates scripts cron pythonlib \
Mailman Mailman/bin Mailman/database Mailman/Cgi Mailman/Archiver \
Mailman/Handlers Mailman/Queue Mailman/Queue/tests \
Mailman/Bouncers \