I have wrote a simple program to test getgroups functionality:
Here is my group configuration:
test_user is member of all groups. and here is the program:
//I get number of supplementary groups
int number_of_groups = getgroups(0, NULL);
This program is running with user id of test_user. But the problem is this:
'number_of_groups' is always '1'