summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw1998-06-02 18:52:27 +0000
committerbwarsaw1998-06-02 18:52:27 +0000
commit1e0795ede3a6d0dee55bccb403226cd49e248fba (patch)
treedae33ae6cedad36a6868d51804be19ba1509418d
parentb8e1c7a4f1f3772937316a84e035ea8d5c83b9d7 (diff)
downloadmailman-1e0795ede3a6d0dee55bccb403226cd49e248fba.tar.gz
mailman-1e0795ede3a6d0dee55bccb403226cd49e248fba.tar.zst
mailman-1e0795ede3a6d0dee55bccb403226cd49e248fba.zip
--with-cgi-gid and --with-mail-gid now can take a list of integer
group id's or symbolic group names. The first value that resolves to an existing group is used (the numeric group id is used). If none resolve it is a fatal error, as before. By default --with-cgi-gid defaults to "www www-data nobody" and with-mail-gid defaults to "other".
-rw-r--r--configure.in34
1 files changed, 23 insertions, 11 deletions
diff --git a/configure.in b/configure.in
index 618d79390..b9b79c193 100644
--- a/configure.in
+++ b/configure.in
@@ -15,7 +15,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl Process this file with autoconf to produce a configure script.
-AC_REVISION($Revision: 661 $)
+AC_REVISION($Revision: 681 $)
AC_PREREQ(2.0)
AC_INIT(src/alias-wrapper.c)
@@ -117,11 +117,18 @@ changequote(,)
if test -z "$$1"
then
cat > conftest.py <<EOF
-import grp
-try:
- gid = grp.getgrnam("$2")[2]
-except KeyError:
- gid = ''
+import grp, string
+gid = ''
+for group in string.split("$2"):
+ try:
+ try:
+ gid = grp.getgrgid(int(group))
+ break
+ except ValueError:
+ gid = grp.getgrnam(group)[2]
+ break
+ except KeyError:
+ gid = ''
fp = open("conftest.out", "w")
fp.write("%s\n" % gid)
fp.close()
@@ -142,22 +149,27 @@ fi
AC_MSG_RESULT($$1)
rm -f conftest.out conftest.py])
-
# Now find the UIDs and GIDs
# Support --with-mail-gid and --with-cgi-gid
AC_MSG_CHECKING(for --with-mail-gid)
AC_ARG_WITH(mail-gid, [
--with-mail-gid specify GID mail programs run as])
+if test -z "$with_mail_gid"
+then
+ with_mail_gid=other
+fi
AC_MSG_RESULT($with_mail_gid)
-MAIL_GID=$with_mail_gid
-MM_FIND_GROUP_ID(MAIL_GID, other, mail_wrapper)
+MM_FIND_GROUP_ID(MAIL_GID, $with_mail_gid, mail_wrapper)
AC_MSG_CHECKING(for --with-cgi-gid)
AC_ARG_WITH(cgi-gid, [
--with-cgi-gid specify GID CGI programs run as])
+if test -z "$with_cgi_gid"
+then
+ with_cgi_gid="www www-data nobody"
+fi
AC_MSG_RESULT($with_cgi_gid)
-CGI_GID=$with_cgi_gid
-MM_FIND_GROUP_ID(CGI_GID, nobody, cgi_wrapper)
+MM_FIND_GROUP_ID(CGI_GID, $with_cgi_gid, cgi_wrapper)
#MM_FIND_USER_ID(ALIAS_UID, mailman, alias_wrapper)
#MM_FIND_GROUP_ID(ALIAS_GID, mail, alias_wrapper)