[OpenAFS-devel] interesting issue with setgroups wrapper...

Neulinger, Nathan nneul@umr.edu
Thu, 23 May 2002 10:20:10 -0500


I'm not sure if this has always been this way, but it is definately an
issue with building latest samba...=20

Test program:
#include <unistd.h>
#include <stdio.h>
#include <grp.h>

int main(int argc, char *argv[])
{
        int x[5] =3D {0,0,0,0,0};
        system("id");
        setgroups(0, x);
        system("id");
}

Test output:
uid=3D0(root) gid=3D0(root) groups=3D34479,41855,0(root),7567(dba)
uid=3D0(root) gid=3D0(root)


Basically, running a setgroups with an empty group list (or zero groups)
results in the pag going away. I can't think of any time you'd _REALLY_
want to throw away the pag.=20

I'll work up a fix for this in the linux libafs, but would be interested
in hearing if anyone else has a differing oppinion on how it should
behave.

-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@umr.edu
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216