wrapper is broken on linux (PR#188)

Bug #265275 reported by Bug Importer
2
Affects Status Importance Assigned to Milestone
GNU Mailman
Invalid
Low
Unassigned

Bug Description

Jitterbug-Id: 188
Submitted-By: <email address hidden>
Date: Fri, 21 Jan 2000 17:18:17 -0500 (EST)
Version: 1.1
OS: linux 2.2.12-12 / 2.1.2-11

on linux, egid is 'mailman' while gid is 'nobody', so you have to compare
the
desired gid to egid. the only essential change here is getgid() ->
getegid()
... the rest of the crap is from elsewhere in common.c and i didn't feel
like
actually moving it because then i'd probably have something else break.

i really hate cannon-fodder regression testing...

 stig

--- common.c.bak Fri Jan 21 13:57:21 2000
+++ common.c Fri Jan 21 14:06:08 2000
@@ -115,7 +115,19 @@
 void
 check_caller(const char* ident, gid_t parentgid)
 {
- gid_t mygid = getgid();
+ gid_t mygid = getegid();
+
+ /* We need to set the real gid to the effective gid because there
are
+ * some Linux systems which do not preserve the effective gid
across
+ * popen() calls. This breaks mail delivery unless the
~mailman/data
+ * directory is chown'd to the uid that runs mail programs, and
that
+ * isn't a viable alternative.
+ */
+#ifdef HAVE_SETREGID
+ if (setregid(mygid, -1))
+ fatal(logident, SETREGID_FAILURE, "%s",
strerror(errno));
+#endif /* HAVE_SETREGID */
+
        if (parentgid != mygid) {
                fatal(ident, GID_MISMATCH,
                      "Failure to exec script. WANTED gid %d, GOT gid
%d. "

====================================================================
Audit trail:
None

[http://sourceforge.net/tracker/index.php?func=detail&aid=214154&group_id=103&atid=100103]

Revision history for this message
Barry Warsaw (barry) wrote :

I don't think this bug is still relevant. Certainly I've had no problems
with the current code base on RH6.1 linux 2.2.12-20.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.