[Mailman-Users] Web interface stopped working after ubuntu update

Carl Zwanzig cpz at tuunq.com
Wed Mar 29 21:42:35 EDT 2017


On 3/29/2017 3:08 PM, Nick Wyman wrote:
> The setregid call simply returns -1.  What is odd is that it is the
> wrapper is attempting to set the GID to the current value.

I don't have the linux kernel source handy, but in the freebsd code if the 
calling process doesn't have the right credentials, looks like it'll bounce 
regardless of what you're trying to change. That is.... (slightly 
reformatted, and I may be wrong, too)

egid = uap->egid;
rgid = uap->rgid;
...
   if (
	(
	 (rgid != (gid_t)-1 &&
	  rgid != oldcred->cr_rgid &&
           rgid != oldcred->cr_svgid)
          ||
          (egid != (gid_t)-1 &&
	  egid != oldcred->cr_groups[0] &&
           egid != oldcred->cr_rgid &&
	  egid != oldcred->cr_svgid)
	)
	&&
         (error = priv_check_cred(oldcred, PRIV_CRED_SETREGID, 0)) != 0
     )
         goto fail;
(/usr/src/sys/kern/kern_prot.c on a 10.3 system)

Sort of sounds to me that either the calling process isn't actually the IDs 
it should be or that the kernel semantics changed.

Instead of using the wrapper itself, have you written a simple test program 
to play around with combinations of UID/GID? Might be faster just to try 
some variations and see what happens (and maybe try the same on a slightly 
older system).

Later,

z!
who really isn't a BSD kernel hacker


More information about the Mailman-Users mailing list