Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 57189 - /usr/local/mailman/mail/mailman script fails to realise it's executed sgid mailman.
Summary: /usr/local/mailman/mail/mailman script fails to realise it's executed sgid ma...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
: 60842 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-07-15 08:37 UTC by Jaco Kroon
Modified: 2004-08-19 22:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaco Kroon 2004-07-15 08:37:41 UTC
When executing the program from within a .qmail file using:

|preline /usr/local/mailman/mail/mailman request listname

I get this in the qmail logs:

@4000000040f6a28e1c519494 delivery 8: deferral: Group_mismatch_error.__Mailman_expected_the_mail/wrapper_script_to_be_executed_as_group_"mailman",_but/the_system's_mail_server_executed_the_mail_script_as/group_"nofiles".__Try_tweaking_the_mail_server_to_run_the/script_as_group_"mailman",_or_re-run_configure,_/providing_the_command_line_option_`--with-mail-gid=nofiles'./

On line 121 of src/common.c:
        GID_T mygid = getgid();

I suspect that this should be getegid which will pick up the gid of mailman instead of that of the calling process.

The comment however says:

/* Is the parent process allowed to call us?
 */

Which doesn't make sense, as this would imply that the primary group of the calling process must also be mailman, thus only the mailman user is allowed to call the wrapper?  Something is fishy, or I'm missing something.

Reproducible: Always
Steps to Reproduce:
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2004-07-15 13:48:15 UTC
jeez, it shouldn't be in /usr/local at all -- that's a glaring error to begin with.
Comment 2 Jaco Kroon 2004-07-15 23:38:56 UTC
That is what I thought as well.  But I can't see any asy way of fixing this, other than say moving the whole mailman tree to, say /opt/mailman.

Back to the problem of it being run with gid=nofiles and egid=mailman.  How do we solve that?
Comment 3 Jaco Kroon 2004-07-16 16:25:11 UTC
Managed to fix this the "correct" way.  By getting qmail to deliver to mailman using aliases.  I'll write up a howto on this and publish the URI tomorrow afternoon.
Comment 4 Jaco Kroon 2004-07-18 11:05:04 UTC
http://www.kroon.co.za/howto.php?howto=qmail_mailman should shed some light :).
Comment 5 Tuan Van (RETIRED) gentoo-dev 2004-08-19 22:40:47 UTC
*** Bug 60842 has been marked as a duplicate of this bug. ***