rpms/mailman/devel mailman-2.1.12-lctype.patch, NONE, 1.1 mailman-2.1.12-multimail.patch, NONE, 1.1 mailman.spec, 1.77, 1.78
Daniel Novotny
dnovotny at fedoraproject.org
Wed Mar 11 12:34:00 UTC 2009
- Previous message (by thread): rpms/cupsddk/devel dead.package, NONE, 1.1 Makefile, 1.1, NONE cupsddk-no-gzip-man-pages.patch, 1.1, NONE cupsddk-no-strip.patch, 1.1, NONE cupsddk-smp-build.patch, 1.1, NONE cupsddk.spec, 1.11, NONE sources, 1.5, NONE
- Next message (by thread): rpms/gnome-packagekit/devel gnome-packagekit.spec,1.76,1.77
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dnovotny
Update of /cvs/extras/rpms/mailman/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13675
Modified Files:
mailman.spec
Added Files:
mailman-2.1.12-lctype.patch mailman-2.1.12-multimail.patch
Log Message:
update to 2.1.12
mailman-2.1.12-lctype.patch:
--- NEW FILE mailman-2.1.12-lctype.patch ---
diff -up mailman-2.1.12/bin/add_members.lctype mailman-2.1.12/bin/add_members
--- mailman-2.1.12/bin/add_members.lctype 2009-03-10 12:44:57.000000000 +0100
+++ mailman-2.1.12/bin/add_members 2009-03-10 12:47:17.000000000 +0100
@@ -80,7 +80,7 @@ from Mailman import Errors
from Mailman import mm_cfg
from Mailman import i18n
-_ = i18n._
+C_ = i18n.C_
@@ -89,7 +89,7 @@ def usage(status, msg=''):
fd = sys.stderr
else:
fd = sys.stdout
- print >> fd, _(__doc__)
+ print >> fd, C_(__doc__)
if msg:
print >> fd, msg
sys.exit(status)
@@ -134,19 +134,19 @@ def addall(mlist, members, digest, ack,
try:
mlist.ApprovedAddMember(userdesc, ack, 0)
except Errors.MMAlreadyAMember:
- print >> tee, _('Already a member: %(member)s')
+ print >> tee, C_('Already a member: %(member)s')
except Errors.MembershipIsBanned, pattern:
print >> tee, ('%s:' %
- member), _('Banned address (matched %(pattern)s)')
+ member), C_('Banned address (matched %(pattern)s)')
except Errors.MMBadEmailError:
if userdesc.address == '':
- print >> tee, _('Bad/Invalid email address: blank line')
+ print >> tee, C_('Bad/Invalid email address: blank line')
else:
- print >> tee, _('Bad/Invalid email address: %(member)s')
+ print >> tee, C_('Bad/Invalid email address: %(member)s')
except Errors.MMHostileAddress:
- print >> tee, _('Hostile address (illegal characters): %(member)s')
+ print >> tee, C_('Hostile address (illegal characters): %(member)s')
else:
- print >> tee, _('Subscribed: %(member)s')
+ print >> tee, C_('Subscribed: %(member)s')
@@ -191,26 +191,26 @@ def main():
elif arg.lower()[0] == 'n':
send_welcome_msg = 0
else:
- usage(1, _('Bad argument to -w/--welcome-msg: %(arg)s'))
+ usage(1, C_('Bad argument to -w/--welcome-msg: %(arg)s'))
elif opt in ('-a', '--admin-notify'):
if arg.lower()[0] == 'y':
admin_notif = 1
elif arg.lower()[0] == 'n':
admin_notif = 0
else:
- usage(1, _('Bad argument to -a/--admin-notify: %(arg)s'))
+ usage(1, C_('Bad argument to -a/--admin-notify: %(arg)s'))
if dfile is None and nfile is None:
usage(1)
if dfile == "-" and nfile == "-":
- usage(1, _('Cannot read both digest and normal members '
+ usage(1, C_('Cannot read both digest and normal members '
'from standard input.'))
try:
mlist = MailList.MailList(listname)
except Errors.MMUnknownListError:
- usage(1, _('No such list: %(listname)s'))
+ usage(1, C_('No such list: %(listname)s'))
# Set up defaults
if send_welcome_msg is None:
@@ -230,7 +230,7 @@ def main():
nmembers = readfile(nfile)
if not dmembers and not nmembers:
- usage(0, _('Nothing to do.'))
+ usage(0, C_('Nothing to do.'))
s = StringIO()
i18n.set_language(mlist.preferred_language)
@@ -242,7 +242,7 @@ def main():
if admin_notif:
realname = mlist.real_name
- subject = _('%(realname)s subscription notification')
+ subject = C_('%(realname)s subscription notification')
msg = Message.UserNotification(
mlist.owner, Utils.get_site_email(), subject, s.getvalue(),
mlist.preferred_language)
diff -up mailman-2.1.12/bin/arch.lctype mailman-2.1.12/bin/arch
--- mailman-2.1.12/bin/arch.lctype 2009-03-10 12:33:40.000000000 +0100
+++ mailman-2.1.12/bin/arch 2009-03-10 12:35:10.000000000 +0100
@@ -70,7 +70,7 @@ from Mailman.Archiver.HyperArch import H
from Mailman.LockFile import LockFile
from Mailman import i18n
-_ = i18n._
+C_ = i18n.C_
PROGRAM = sys.argv[0]
i18n.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE)
@@ -82,7 +82,7 @@ def usage(code, msg=''):
fd = sys.stderr
else:
fd = sys.stdout
- print >> fd, _(__doc__)
+ print >> fd, C_(__doc__)
if msg:
print >> fd, msg
sys.exit(code)
@@ -122,7 +122,7 @@ def main():
# grok arguments
if len(args) < 1:
- usage(1, _('listname is required'))
+ usage(1, C_('listname is required'))
listname = args[0].lower().strip()
if len(args) < 2:
@@ -140,7 +140,7 @@ def main():
try:
mlist = MailList(listname)
except Errors.MMListError, e:
- usage(2, _('No such list "%(listname)s"\n%(e)s'))
+ usage(2, C_('No such list "%(listname)s"\n%(e)s'))
if mbox is None:
mbox = mlist.ArchiveFileName()
@@ -165,7 +165,7 @@ def main():
try:
fp = open(mbox)
except IOError, msg:
- usage(3, _('Cannot open mbox file %(mbox)s: %(msg)s'))
+ usage(3, C_('Cannot open mbox file %(mbox)s: %(msg)s'))
# Maybe wipe the old archives
if wipe:
if mlist.scrub_nondigest:
diff -up mailman-2.1.12/bin/b4b5-archfix.lctype mailman-2.1.12/bin/b4b5-archfix
--- mailman-2.1.12/bin/b4b5-archfix.lctype 2009-03-10 12:53:58.000000000 +0100
+++ mailman-2.1.12/bin/b4b5-archfix 2009-03-10 12:54:11.000000000 +0100
@@ -44,7 +44,7 @@ import cPickle as pickle
# Required to get the right classes for unpickling
import paths
-from Mailman.i18n import _
+from Mailman.i18n import C_
PROGRAM = sys.argv[0]
@@ -55,7 +55,7 @@ def usage(code, msg=''):
fd = sys.stderr
else:
fd = sys.stdout
- print >> fd, _(__doc__)
+ print >> fd, C_(__doc__)
if msg:
print >> fd, msg
sys.exit(code)
diff -up mailman-2.1.12/bin/change_pw.lctype mailman-2.1.12/bin/change_pw
--- mailman-2.1.12/bin/change_pw.lctype 2009-03-10 13:09:50.000000000 +0100
+++ mailman-2.1.12/bin/change_pw 2009-03-10 13:10:18.000000000 +0100
@@ -76,7 +76,7 @@ from Mailman import Errors
from Mailman import Message
from Mailman import i18n
-_ = i18n._
+C_ = i18n.C_
SPACE = ' '
@@ -87,7 +87,7 @@ def usage(code, msg=''):
fd = sys.stderr
else:
fd = sys.stdout
- print >> fd, _(__doc__)
+ print >> fd, C_(__doc__)
if msg:
print >> fd, msg
sys.exit(code)
@@ -103,7 +103,7 @@ def openlist(listname):
try:
mlist = MailList.MailList(listname, lock=0)
except Errors.MMListError, e:
- usage(1, _('No such list "%(listname)s"\n%(e)s'))
+ usage(1, C_('No such list "%(listname)s"\n%(e)s'))
_listcache[listname] = mlist
return mlist
@@ -141,11 +141,11 @@ def main():
if args:
strargs = SPACE.join(args)
[...2104 lines suppressed...]
sys.exit(code)
@@ -175,11 +175,11 @@ def atexit():
if m.Locked():
if VERBOSE:
listname = m.internal_name()
- print >> sys.stderr, _(
+ print >> sys.stderr, C_(
'Unlocking (but not saving) list: %(listname)s')
m.Unlock()
if VERBOSE:
- print >> sys.stderr, _('Finalizing')
+ print >> sys.stderr, C_('Finalizing')
del m
@@ -188,16 +188,16 @@ def do_list(listname, args, func):
global m
# first try to open mailing list
if VERBOSE:
- print >> sys.stderr, _('Loading list %(listname)s'),
+ print >> sys.stderr, C_('Loading list %(listname)s'),
if LOCK:
- print >> sys.stderr, _('(locked)')
+ print >> sys.stderr, C_('(locked)')
else:
- print >> sys.stderr, _('(unlocked)')
+ print >> sys.stderr, C_('(unlocked)')
try:
m = MailList.MailList(listname, lock=LOCK)
except Errors.MMUnknownListError:
- print >> sys.stderr, _('Unknown list: %(listname)s')
+ print >> sys.stderr, C_('Unknown list: %(listname)s')
m = None
# try to import the module and run the callable
@@ -237,7 +237,7 @@ def main():
all = True
if len(args) < 1 and not all:
- warning = _('No list name supplied.')
+ warning = C_('No list name supplied.')
if interact:
# Let them keep going
print warning
@@ -246,7 +246,7 @@ def main():
usage(1, warning)
if all and not run:
- usage(1, _('--all requires --run'))
+ usage(1, C_('--all requires --run'))
# The default for interact is 1 unless -r was given
if interact is None:
@@ -266,11 +266,11 @@ def main():
module = run[:i]
callable = run[i+1:]
if VERBOSE:
- print >> sys.stderr, _('Importing %(module)s...')
+ print >> sys.stderr, C_('Importing %(module)s...')
__import__(module)
mod = sys.modules[module]
if VERBOSE:
- print >> sys.stderr, _('Running %(module)s.%(callable)s()...')
+ print >> sys.stderr, C_('Running %(module)s.%(callable)s()...')
func = getattr(mod, callable)
if all:
@@ -291,7 +291,7 @@ def main():
namespace = globals().copy()
namespace.update(locals())
if dolist:
- ban = _("The variable `m' is the %(listname)s MailList instance")
+ ban = C_("The variable `m' is the %(listname)s MailList instance")
else:
ban = None
code.InteractiveConsole(namespace).interact(ban)
diff -up mailman-2.1.12/Mailman/i18n.py.lctype mailman-2.1.12/Mailman/i18n.py
--- mailman-2.1.12/Mailman/i18n.py.lctype 2009-03-10 13:14:46.000000000 +0100
+++ mailman-2.1.12/Mailman/i18n.py 2009-03-10 13:18:10.000000000 +0100
@@ -15,6 +15,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
+import locale
import sys
import time
import gettext
@@ -26,6 +27,16 @@ from Mailman.SafeDict import SafeDict
_translation = None
+def _get_ctype_charset():
+ old = locale.setlocale(locale.LC_CTYPE, '')
+ charset = locale.nl_langinfo(locale.CODESET)
+ locale.setlocale(locale.LC_CTYPE, old)
+ return charset
+
+_ctype_charset = _get_ctype_charset()
+
+
+
def set_language(language=None):
global _translation
@@ -54,7 +65,7 @@ if _translation is None:
-def _(s):
+def _(s, frame = 1):
if s == '':
return s
assert s
@@ -70,7 +81,7 @@ def _(s):
# original string is 1) locals dictionary, 2) globals dictionary.
#
# First, get the frame of the caller
- frame = sys._getframe(1)
+ frame = sys._getframe(frame)
# A `safe' dictionary is used so we won't get an exception if there's a
# missing key in the dictionary.
dict = SafeDict(frame.f_globals.copy())
@@ -88,6 +99,21 @@ def _(s):
if isinstance(v, UnicodeType):
dict[k] = v.encode(charset, 'replace')
return tns % dict
+
+
+def tolocale(s):
+ global _ctype_charset
+ if isinstance(s, UnicodeType):
+ return s
+ source = _translation.charset ()
+ if not source:
+ return s
+ return unicode(s, source, 'replace').encode(_ctype_charset, 'replace')
+
+def C_(s):
+ return tolocale(_(s, 2))
+
+
diff -up mailman-2.1.12/Mailman/MTA/Postfix.py.lctype mailman-2.1.12/Mailman/MTA/Postfix.py
--- mailman-2.1.12/Mailman/MTA/Postfix.py.lctype 2009-03-10 13:13:45.000000000 +0100
+++ mailman-2.1.12/Mailman/MTA/Postfix.py 2009-03-10 13:14:16.000000000 +0100
@@ -27,7 +27,7 @@ from stat import *
from Mailman import mm_cfg
from Mailman import Utils
from Mailman import LockFile
-from Mailman.i18n import _
+from Mailman.i18n import C_
from Mailman.MTA.Utils import makealiases
from Mailman.Logging.Syslog import syslog
@@ -308,7 +308,7 @@ def checkperms(state):
targetmode = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
for file in ALIASFILE, VIRTFILE:
if state.VERBOSE:
- print _('checking permissions on %(file)s')
+ print C_('checking permissions on %(file)s')
stat = None
try:
stat = os.stat(file)
@@ -318,9 +318,9 @@ def checkperms(state):
if stat and (stat[ST_MODE] & targetmode) <> targetmode:
state.ERRORS += 1
octmode = oct(stat[ST_MODE])
- print _('%(file)s permissions must be 066x (got %(octmode)s)'),
+ print C_('%(file)s permissions must be 066x (got %(octmode)s)'),
if state.FIX:
- print _('(fixing)')
+ print C_('(fixing)')
os.chmod(file, stat[ST_MODE] | targetmode)
else:
print
@@ -336,7 +336,7 @@ def checkperms(state):
raise
continue
if state.VERBOSE:
- print _('checking ownership of %(dbfile)s')
+ print C_('checking ownership of %(dbfile)s')
user = mm_cfg.MAILMAN_USER
ownerok = stat[ST_UID] == pwd.getpwnam(user)[2]
if not ownerok:
@@ -344,10 +344,10 @@ def checkperms(state):
owner = pwd.getpwuid(stat[ST_UID])[0]
except KeyError:
owner = 'uid %d' % stat[ST_UID]
- print _('%(dbfile)s owned by %(owner)s (must be owned by %(user)s'),
+ print C_('%(dbfile)s owned by %(owner)s (must be owned by %(user)s'),
state.ERRORS += 1
if state.FIX:
- print _('(fixing)')
+ print C_('(fixing)')
uid = pwd.getpwnam(user)[2]
gid = grp.getgrnam(mm_cfg.MAILMAN_GROUP)[2]
os.chown(dbfile, uid, gid)
mailman-2.1.12-multimail.patch:
--- NEW FILE mailman-2.1.12-multimail.patch ---
--- mailman-2.1.7/configure.in.multimail 2005-08-27 03:40:15.000000000 +0200
+++ mailman-2.1.7/configure.in 2006-01-10 10:53:14.000000000 +0100
@@ -208,26 +208,101 @@
fi
# new macro for finding group names
-AC_DEFUN([MM_FIND_GROUP_NAME], [
+# returns a comma separated list of quoted group names
+# the list is returned in the same order as specified with any duplicates removed
+# the filter flag must be "yes" or "no", e.g. this is permcheck
+# "no" ==> none existing groups are not filtered out
+# "yes" ==> only those groups that are in the group database are included
+# in the list
+AC_DEFUN(MM_FIND_GROUP_LIST, [
# $1 == variable name
-# $2 == user id to check for
+# $2 == white space separated list of groups to check,
+# list may contain mix of id's and names
+# $3 == filter, if == 'yes' then remove any non-existing groups
AC_SUBST($1)
changequote(,)
if test -z "$$1"
then
cat > conftest.py <<EOF
import grp
-gid = ''
+group_names = []
+seen = {}
+filter = "$3"
+
for group in "$2".split():
try:
+ gid = int(group)
+ try:
+ gname = grp.getgrgid(gid)[0]
+ except KeyError:
+ gname = ''
+ except ValueError:
try:
- gname = grp.getgrgid(int(group))[0]
- break
- except ValueError:
gname = grp.getgrnam(group)[0]
+ except KeyError:
+ if filter == "yes":
+ gname = ''
+ else:
+ gname = group
+ if gname:
+ if gname not in seen:
+ seen[gname] = 1
+ group_names.append(gname)
+
+if group_names:
+ val = '"' + '", "'.join(group_names) + '"'
+ #val = "'"+val+"'"
+else:
+ val = ''
+
+fp = open("conftest.out", "w")
+fp.write("%s\n" % val)
+fp.close()
+EOF
+ $PYTHON conftest.py
+ $1=`cat conftest.out`
+fi
+changequote([, ])
+rm -f conftest.out conftest.py])
+
+
+# new macro for finding group names
+AC_DEFUN(MM_FIND_GROUP_NAME, [
+# Given a list of tokens, either a name or a number (gid)
+# return the first one in the list that is found in the
+# group database. The return value is always a name, possibly
+# translated from a gid. If permcheck is "no" then the group
+# database is not checked, instead the first token in the list
+# which is a name is returned (e.g. the default value). If permcheck
+# is no and only gid's are in the list then the null string is returned.
+# $1 == variable name
+# $2 == group id to check for
+# $3 == permcheck, either "yes" or "no"
+AC_SUBST($1)
+changequote(,)
+if test -z "$$1"
+then
+ cat > conftest.py <<EOF
+import grp
+gname=''
+if "$3" == "yes":
+ for group in "$2".split():
+ try:
+ try:
+ gname = grp.getgrgid(int(group))[0]
+ break
+ except ValueError:
+ gname = grp.getgrnam(group)[0]
+ break
+ except KeyError:
+ gname = ''
+else:
+ for group in "$2".split():
+ try:
+ int(group)
+ except ValueError:
+ gname = group
break
- except KeyError:
- gname = ''
fp = open("conftest.out", "w")
fp.write("%s\n" % gname)
fp.close()
@@ -241,25 +316,41 @@
# new macro for finding UIDs
AC_DEFUN(MM_FIND_USER_NAME, [
+# Given a list of tokens, either a name or a number (uid)
+# return the first one in the list that is found in the
+# password database. The return value is always a name, possibly
+# translated from a uid. If permcheck is "no" then the password
+# database is not checked, instead the first token in the list
+# which is a name is returned (e.g. the default value). If permcheck
+# is no and only uid's are in the list then the null string is returned.
# $1 == variable name
# $2 == user id to check for
+# $3 == permcheck, either "yes" or "no"
AC_SUBST($1)
changequote(,)
if test -z "$$1"
then
cat > conftest.py <<EOF
import pwd
-uid = ''
-for user in "$2".split():
- try:
+uname=''
+if "$3" == "yes":
+ for user in "$2".split():
try:
- uname = pwd.getpwuid(int(user))[0]
- break
+ try:
+ uname = pwd.getpwuid(int(user))[0]
+ break
+ except ValueError:
+ uname = pwd.getpwnam(user)[0]
+ break
+ except KeyError:
+ uname = ''
+else:
+ for user in "$2".split():
+ try:
+ int(user)
except ValueError:
- uname = pwd.getpwnam(user)[0]
+ uname = user
break
- except KeyError:
- uname = ''
fp = open("conftest.out", "w")
fp.write("%s\n" % uname)
fp.close()
@@ -285,7 +376,7 @@
# User `mailman' must exist
AC_SUBST(MAILMAN_USER)
AC_MSG_CHECKING(for user name \"$USERNAME\")
-MM_FIND_USER_NAME(MAILMAN_USER, $USERNAME)
+MM_FIND_USER_NAME(MAILMAN_USER, $USERNAME, $with_permcheck)
if test -z "$MAILMAN_USER"
then
if test "$with_permcheck" = "yes"
@@ -316,7 +407,7 @@
# Target group must exist
AC_SUBST(MAILMAN_GROUP)
AC_MSG_CHECKING(for group name \"$GROUPNAME\")
-MM_FIND_GROUP_NAME(MAILMAN_GROUP, $GROUPNAME)
+MM_FIND_GROUP_NAME(MAILMAN_GROUP, $GROUPNAME, $with_permcheck)
if test -z "$MAILMAN_GROUP"
then
if test "$with_permcheck" = "yes"
@@ -339,11 +430,11 @@
prefix = "$prefixcheck"
groupname = "$GROUPNAME"
mailmangroup = "$MAILMAN_GROUP"
-try:
- mailmangid = grp.getgrnam(mailmangroup)[2]
-except KeyError:
- mailmangid = -1
problems = []
+try: mailmangid = grp.getgrnam(mailmangroup)[2]
+except KeyError:
+ problems.append("group doesn't exist: " + mailmangroup)
+ mailmangid = 41
try: statdata = os.stat(prefix)
except OSError:
problems.append("Directory doesn't exist: " + prefix)
@@ -393,7 +484,7 @@
then
with_mail_gid="mailman other mail daemon"
fi
-MM_FIND_GROUP_NAME(MAIL_GROUP, $with_mail_gid)
+MM_FIND_GROUP_LIST(MAIL_GROUP, $with_mail_gid, $with_permcheck)
if test -z "$MAIL_GROUP"
then
if test "$with_permcheck" = "yes"
@@ -420,7 +511,7 @@
with_cgi_gid="www www-data nobody"
fi
-MM_FIND_GROUP_NAME(CGI_GROUP, $with_cgi_gid)
+MM_FIND_GROUP_LIST(CGI_GROUP, $with_cgi_gid, $with_permcheck)
if test -z "$CGI_GROUP"
then
if test "$with_permcheck" = "yes"
--- mailman-2.1.7/src/Makefile.in.multimail 2005-08-27 03:40:17.000000000 +0200
+++ mailman-2.1.7/src/Makefile.in 2006-01-10 10:53:14.000000000 +0100
@@ -49,9 +49,9 @@
SHELL= /bin/sh
-MAIL_FLAGS= -DMAIL_GROUP="\"$(MAIL_GROUP)\""
+MAIL_FLAGS= -DMAIL_GROUP='$(MAIL_GROUP)'
-CGI_FLAGS= -DCGI_GROUP="\"$(CGI_GROUP)\""
+CGI_FLAGS= -DCGI_GROUP='$(CGI_GROUP)'
HELPFUL= -DHELPFUL
--- mailman-2.1.7/src/common.h.multimail 2005-08-27 03:40:17.000000000 +0200
+++ mailman-2.1.7/src/common.h 2006-01-10 10:53:14.000000000 +0100
@@ -33,7 +33,7 @@
#define GID_T GETGROUPS_T
extern void fatal(const char*, int, char*, ...);
-extern void check_caller(const char*, const char*);
+extern void check_caller(const char* ident, const char**, size_t);
extern int run_script(const char*, int, char**, char**);
/* Global variable used as a flag. */
@@ -51,7 +51,7 @@
#define MAIL_USAGE_ERROR 5
#define MAIL_ILLEGAL_COMMAND 6
#define ADDALIAS_USAGE_ERROR 7
-#define GROUP_NAME_NOT_FOUND 8
+#define GROUP_ID_NOT_FOUND 8
/*
--- mailman-2.1.7/src/cgi-wrapper.c.multimail 2005-08-27 03:40:17.000000000 +0200
+++ mailman-2.1.7/src/cgi-wrapper.c 2006-01-10 10:53:14.000000000 +0100
@@ -28,11 +28,11 @@
/* Group name that CGI scripts run as. See your web server's documentation
* for details.
*/
-#define LEGAL_PARENT_GROUP CGI_GROUP
+#define LEGAL_PARENT_GROUPS CGI_GROUP
const char* logident = LOG_IDENT;
char* script = SCRIPTNAME;
-const char* parentgroup = LEGAL_PARENT_GROUP;
+const char* parentgroups[] = {LEGAL_PARENT_GROUPS};
int
@@ -42,7 +42,7 @@
char* fake_argv[3];
running_as_cgi = 1;
- check_caller(logident, parentgroup);
+ check_caller(logident, parentgroups, sizeof(parentgroups) / sizeof(parentgroups[0]));
/* For these CGI programs, we can ignore argc and argv since they
* don't contain anything useful. `script' will always be the driver
--- mailman-2.1.7/src/common.c.multimail 2005-12-30 19:50:08.000000000 +0100
+++ mailman-2.1.7/src/common.c 2006-01-10 11:01:43.000000000 +0100
@@ -117,13 +117,14 @@
/* Is the parent process allowed to call us?
*/
void
-check_caller(const char* ident, const char* parentgroup)
+check_caller(const char* ident, const char** parentgroups, size_t numgroups)
{
GID_T mygid = getgid();
struct group *mygroup = getgrgid(mygid);
char* option;
char* server;
char* wrapper;
+ int i;
if (running_as_cgi) {
option = "--with-cgi-gid";
@@ -136,28 +137,46 @@
wrapper = "mail";
}
- if (!mygroup)
- fatal(ident, GROUP_NAME_NOT_FOUND,
- "Failure to find group name for GID %d. Mailman\n"
- "expected the %s wrapper to be executed as group\n"
- "\"%s\", but the system's %s server executed the\n"
- "wrapper as GID %d for which the name could not be\n"
- "found. Try adding GID %d to your system as \"%s\",\n"
- "or tweak your %s server to run the wrapper as group\n"
- "\"%s\".",
- mygid, wrapper, parentgroup, server, mygid, mygid,
- parentgroup, server, parentgroup);
+ if (!mygroup)
+ fatal(ident, GROUP_ID_NOT_FOUND,
+ "Failure to lookup via getgrgid() the group info for group id %d that this Mailman %s wrapper is executing under.\n"
+ "This is probably due to an incorrectly configured system and is not a Mailman problem",
+ mygid, wrapper);
+
+ for (i = 0; i < numgroups; i++) {
+ if (strcmp(parentgroups[i], mygroup->gr_name) == 0) break;
+ }
+
+ if (i >= numgroups) {
+ char *groupset = NULL;
+ size_t size = 0;
+
+ for (i = 0; i < numgroups; i++) {
+ size += strlen(parentgroups[i]) + 2;
+ }
+
+ groupset = malloc(size);
+
+ if (groupset) {
+ groupset[0] = 0;
+ for (i = 0; i < numgroups; i++) {
+ strcat(groupset, parentgroups[i]);
+ if (i < numgroups-1) strcat(groupset, ", ");
+ }
+ }
- if (strcmp(parentgroup, mygroup->gr_name))
fatal(ident, GROUP_MISMATCH,
- "Group mismatch error. Mailman expected the %s\n"
- "wrapper script to be executed as group \"%s\", but\n"
- "the system's %s server executed the %s script as\n"
- "group \"%s\". Try tweaking the %s server to run the\n"
- "script as group \"%s\", or re-run configure, \n"
- "providing the command line option `%s=%s'.",
- wrapper, parentgroup, server, wrapper, mygroup->gr_name,
- server, parentgroup, option, mygroup->gr_name);
+ "Group mismatch error. Mailman expected the %s wrapper script to be\n"
+ "executed as one of the following groups:\n"
+ "[%s],\n"
+ "but the system's %s server executed the %s script as group: \"%s\".\n"
+ "Try tweaking the %s server to run the script as one of these groups:\n"
+ "[%s],\n"
+ "or re-run configure providing the command line option:\n"
+ "'%s=%s'.",
+ wrapper, groupset, server, wrapper, mygroup->gr_name,
+ server, groupset, option, mygroup->gr_name);
+ }
}
--- mailman-2.1.7/src/mail-wrapper.c.multimail 2005-08-27 03:40:17.000000000 +0200
+++ mailman-2.1.7/src/mail-wrapper.c 2006-01-10 10:53:14.000000000 +0100
@@ -23,9 +23,9 @@
/* Group name that your mail programs run as. See your mail server's
* documentation for details.
*/
-#define LEGAL_PARENT_GROUP MAIL_GROUP
+#define LEGAL_PARENT_GROUPS MAIL_GROUP
-const char* parentgroup = LEGAL_PARENT_GROUP;
+const char* parentgroups[] = {LEGAL_PARENT_GROUPS};
const char* logident = "Mailman mail-wrapper";
@@ -74,7 +74,7 @@
fatal(logident, MAIL_ILLEGAL_COMMAND,
"Illegal command: %s", argv[1]);
- check_caller(logident, parentgroup);
+ check_caller(logident, parentgroups, sizeof(parentgroups) / sizeof(parentgroups[0]));
/* If we got here, everything must be OK */
status = run_script(argv[1], argc, argv, env);
Index: mailman.spec
===================================================================
RCS file: /cvs/extras/rpms/mailman/devel/mailman.spec,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- mailman.spec 25 Feb 2009 22:57:07 -0000 1.77
+++ mailman.spec 11 Mar 2009 12:33:29 -0000 1.78
@@ -1,7 +1,7 @@
Summary: Mailing list manager with built in Web access
Name: mailman
-Version: 2.1.11
-Release: 7%{?dist}
+Version: 2.1.12
+Release: 1%{?dist}
Epoch: 3
Group: Applications/Internet
#Source0: ftp://ftp.gnu.org/pub/gnu/mailman/mailman-%{version}.tgz
@@ -14,21 +14,22 @@
Source7: mailman-migrate-fhs
Source8: mailman-update-cfg
-Patch1: mailman-2.1-multimail.patch
+Patch1: mailman-2.1.12-multimail.patch
Patch2: mailman-2.1-build.patch
Patch3: mailman-2.1-mailmanctl-status.patch
Patch4: mailman-2.1.11-cron.patch
Patch5: mailman-2.1.10-FHS.patch
Patch6: mailman-python-compile.patch
Patch7: mailman-2.1.10-archive-reply.patch
-Patch8: mailman-2.1.11-lctype.patch
+#Patch8: mailman-2.1.11-lctype.patch
Patch9: mailman-2.1.9-ctypo-new.patch
Patch10: mailman-2.1.10-ctypefix.patch
Patch11: mailman-2.1.9-header-folding.patch
Patch12: mailman-2.1.9-selinux.patch
Patch13: mailman-2.1.9-unicode.patch
Patch14: mailman-2.1.11-fhsinit.patch
-Patch15: mailman-2.1.11-footer.patch
+Patch15: mailman-2.1.12-lctype.patch
+#Patch15: mailman-2.1.11-footer.patch
License: GPLv2+
URL: http://www.list.org/
@@ -94,7 +95,7 @@
%prep
#FIXME -- This is a temporary solution
-%define _default_patch_fuzz 2
+%define _default_patch_fuzz 3
%setup -q
%patch1 -p1 -b .multimail
@@ -104,14 +105,15 @@
%patch5 -p1 -b .FHS
%patch6 -p1 -b .python-compile
%patch7 -p1 -b .archive-in-reply-to
-%patch8 -p1 -b .lctype
+#%%patch8 -p1 -b .lctype
%patch9 -p1 -b .ctypo
%patch10 -p1 -b .ctypefix
%patch11 -p0 -b .header
%patch12 -p1 -b .selinux
%patch13 -p1 -b .unicode
%patch14 -p1 -b .fhsinit
-%patch15 -p1 -b .footer
+%patch15 -p1 -b .lctype
+#%%patch15 -p1 -b .footer
#cp $RPM_SOURCE_DIR/mailman.INSTALL.REDHAT.in INSTALL.REDHAT.in
cp %{SOURCE5} INSTALL.REDHAT.in
@@ -362,6 +364,9 @@
%attr(0755,root,root) %{_bindir}/mailman-update-cfg
%changelog
+* Wed Mar 11 2009 Daniel Novotny <dnovotny at redhat.com> 3:2.1.12-1
+- upgrade to 2.1.12, drop upstreamed patches, rebase other patches
+
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3:2.1.11-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
- Previous message (by thread): rpms/cupsddk/devel dead.package, NONE, 1.1 Makefile, 1.1, NONE cupsddk-no-gzip-man-pages.patch, 1.1, NONE cupsddk-no-strip.patch, 1.1, NONE cupsddk-smp-build.patch, 1.1, NONE cupsddk.spec, 1.11, NONE sources, 1.5, NONE
- Next message (by thread): rpms/gnome-packagekit/devel gnome-packagekit.spec,1.76,1.77
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list