summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/convert_list2
-rwxr-xr-xbin/newlist2
-rwxr-xr-xcgi/admin5
-rwxr-xr-xcgi/edithtml3
-rwxr-xr-xcgi/handle_opts4
-rwxr-xr-xcgi/listinfo5
-rwxr-xr-xcgi/options4
-rwxr-xr-xcgi/roster2
-rwxr-xr-xcgi/subscribe4
-rwxr-xr-xcron/checkdbs3
-rwxr-xr-xcron/mailpasswds9
-rwxr-xr-xcron/senddigests3
-rwxr-xr-xscripts/post4
13 files changed, 25 insertions, 25 deletions
diff --git a/bin/convert_list b/bin/convert_list
index 0416fc216..6722be734 100755
--- a/bin/convert_list
+++ b/bin/convert_list
@@ -113,5 +113,5 @@ for member in digest_members:
pw = GetRandomPassword()
list.ApprovedAddMember(member, pw, 1)
-
+list.Unlock()
diff --git a/bin/newlist b/bin/newlist
index d8a554644..c12ae596b 100755
--- a/bin/newlist
+++ b/bin/newlist
@@ -147,5 +147,7 @@ Please address all questions to mailman-owner@%s.
"%s-request@%s" % (list_name, newlist.host_name),
newlist.host_name))
+newlist.Unlock()
+
if __name__ == "__main__":
raise SystemExit(main(sys.argv))
diff --git a/cgi/admin b/cgi/admin
index 2d918b865..706cdcea7 100755
--- a/cgi/admin
+++ b/cgi/admin
@@ -21,7 +21,7 @@
To run stand-alone for debugging, set env var PATH_INFO to name of list
and, optionally, options category."""
-__version__ = "$Revision: 696 $"
+__version__ = "$Revision: 732 $"
import sys
import os, cgi, string, crypt, types, time
@@ -230,8 +230,7 @@ def FormatAdminOverview(error=None):
names = mm_utils.list_names()
names.sort()
for n in names:
- l = maillist.MailList(n)
- l.Unlock()
+ l = maillist.MailList(n, lock=0)
if l.advertised: advertised.append(l)
if error:
diff --git a/cgi/edithtml b/cgi/edithtml
index f2c5264d0..509bf25a7 100755
--- a/cgi/edithtml
+++ b/cgi/edithtml
@@ -58,7 +58,7 @@ if len(list_info) < 1:
list_name = string.lower(list_info[0])
try:
- list = maillist.MailList(list_name)
+ list = maillist.MailList(list_name, lock=0)
except:
doc.AddItem(htmlformat.Header(2, "%s : No such list" % list_name))
print doc.Format()
@@ -173,4 +173,3 @@ finally:
print doc.Format()
except:
pass
- list.Unlock()
diff --git a/cgi/handle_opts b/cgi/handle_opts
index f8fcd1da1..45a98858c 100755
--- a/cgi/handle_opts
+++ b/cgi/handle_opts
@@ -62,6 +62,7 @@ if not list._ready:
doc.AddItem(htmlformat.Header(2, "Error"))
doc.AddItem(htmlformat.Bold("%s: No such list." % list_name))
print doc.Format(bgcolor="#ffffff")
+ list.Unlock()
sys.exit(0)
@@ -208,3 +209,6 @@ exactly what you did to get this error.<p>''' % (mm_cfg.MAILMAN_OWNER))
pass
list.SetUserOption(user, mm_cfg.ConcealSubscription, conceal)
PrintResults("You have successfully set your options.")
+
+
+list.Unlock() \ No newline at end of file
diff --git a/cgi/listinfo b/cgi/listinfo
index a51e77fb7..b32cfbfd1 100755
--- a/cgi/listinfo
+++ b/cgi/listinfo
@@ -50,7 +50,7 @@ def main():
list_name = string.lower(list_info[0])
try:
- list = maillist.MailList(list_name)
+ list = maillist.MailList(list_name, lock=0)
except:
list = None
@@ -83,8 +83,7 @@ def FormatListinfoOverview(error=None):
http_host = None
for n in names:
- l = maillist.MailList(n)
- l.Unlock()
+ l = maillist.MailList(n, lock = 0)
if l.advertised:
if (http_host
and (string.find(http_host, l.host_name) == -1
diff --git a/cgi/options b/cgi/options
index 2464e8ade..2dcf3d666 100755
--- a/cgi/options
+++ b/cgi/options
@@ -67,6 +67,7 @@ if not list._ready:
doc.AddItem(htmlformat.Header(2, "Error"))
doc.AddItem(htmlformat.Bold("%s: No such list." % list_name ))
print doc.Format()
+ list.Unlock()
sys.exit(0)
if string.lower(user) not in list.members + list.digest_members:
@@ -75,6 +76,7 @@ if string.lower(user) not in list.members + list.digest_members:
% (list_name, `user`)))
doc.AddItem(list.GetMailmanFooter())
print doc.Format()
+ list.Unlock()
sys.exit(0)
# Re-obscure the user's address for the page banner if obscure_addresses set.
@@ -129,3 +131,5 @@ replacements['<mm-email-my-pw>'] = list.FormatButton('emailpw',
doc.AddItem(list.ParseTags('options.html', replacements))
print doc.Format()
+
+list.Unlock() \ No newline at end of file
diff --git a/cgi/roster b/cgi/roster
index 6272e4268..65435e914 100755
--- a/cgi/roster
+++ b/cgi/roster
@@ -95,7 +95,7 @@ def get_list():
sys.exit(0)
list_name = string.lower(list_info[0])
try:
- list = maillist.MailList(list_name)
+ list = maillist.MailList(list_name, lock = 0)
except mm_err.MMUnknownListError:
error_page("%s: No such list.", list_name)
sys.exit(0)
diff --git a/cgi/subscribe b/cgi/subscribe
index df7076e3f..38c1601bf 100755
--- a/cgi/subscribe
+++ b/cgi/subscribe
@@ -55,6 +55,7 @@ if not list._ready:
doc.AddItem(htmlformat.Header(2, "Error"))
doc.AddItem(htmlformat.Bold("%s: No such list." % list_name ))
print doc.Format()
+ list.Unlock()
sys.exit(0)
form = cgi.FieldStorage()
@@ -81,6 +82,7 @@ if (form.has_key("UserOptions")
doc.AddItem(htmlformat.Bold("You must supply your email address."))
doc.AddItem(list.GetMailmanFooter())
print doc.Format()
+ list.Unlock()
sys.exit(0)
addr = form['info'].value
member = list.FindUser(addr)
@@ -90,6 +92,7 @@ if (form.has_key("UserOptions")
% (list.real_name, addr)))
doc.AddItem(list.GetMailmanFooter())
print doc.Format()
+ list.Unlock()
sys.exit(0)
call_script('options', [list._internal_name, member])
if not form.has_key("email"):
@@ -189,3 +192,4 @@ else:
PrintResults()
+list.Unlock() \ No newline at end of file
diff --git a/cron/checkdbs b/cron/checkdbs
index 29d41898b..802769e78 100755
--- a/cron/checkdbs
+++ b/cron/checkdbs
@@ -25,8 +25,7 @@ import maillist, mm_cfg, mm_message, mm_utils
def main():
for name in mm_utils.list_names():
- list = maillist.MailList(name)
- list.Unlock()
+ list = maillist.MailList(name, lock = 0)
count = list.RequestsPending()
if count:
list.SendTextToUser(subject = '%d %s admin request(s) waiting' %
diff --git a/cron/mailpasswds b/cron/mailpasswds
index ebdc8dd2f..96b41a083 100755
--- a/cron/mailpasswds
+++ b/cron/mailpasswds
@@ -87,7 +87,7 @@ def main():
site."""
list = None
for name in mm_utils.list_names():
- list = maillist.MailList(name)
+ list = maillist.MailList(name, lock = 0)
list_name = list.real_name
reminders_to_admins = list.reminders_to_admins
if not list.send_reminders:
@@ -102,13 +102,6 @@ def main():
users[recipient].append(list_name, password, url)
else:
users[recipient] = [(list_name, password, url)]
- # Unlocking each list after identifying passwords, but before having
- # the consolidated list, means that there is a window for discrepancy
- # between the reported and actual password. Big deal - if the user
- # changed the password in the meanwhile, they'll realize it, and it's
- # not worth the extra deadlock risk.
- list.Unlock()
-
if list:
MailAllPasswords(list, users)
diff --git a/cron/senddigests b/cron/senddigests
index f4c153307..d073411df 100755
--- a/cron/senddigests
+++ b/cron/senddigests
@@ -27,8 +27,7 @@ import maillist, mm_cfg, mm_message, mm_utils
def main():
for name in mm_utils.list_names():
- list = maillist.MailList(name)
- list.Unlock()
+ list = maillist.MailList(name, lock=0)
if list.digest_send_periodic:
# Send if there are any messages pending.
list.SendDigestIfAny()
diff --git a/scripts/post b/scripts/post
index 570fc208f..24184664b 100755
--- a/scripts/post
+++ b/scripts/post
@@ -71,6 +71,7 @@ try:
or err_msg == mm_err.FORBIDDEN_SENDER_MSG):
# Do not send hold-for-approval notices for moderated messages
# or potential spam.
+ current_list.Unlock()
sys.exit(0)
the_sender = msg.GetSender()
@@ -100,7 +101,4 @@ notification of the moderator's decison.
# Let another process run.
finally:
current_list.Unlock()
-
-
-