Commit d81f3ec2 authored by Andreas Hasenack's avatar Andreas Hasenack

Problem: test_filter_with_supplemental_process_owner_gid fails

Solution: only set supgroup to a valid gid
parent 645df4e6
......@@ -122,8 +122,10 @@ void init_groups ()
supgroup = group;
notgroup = group + 1;
for (int i = 0; i < ngroups; i++) {
if (supgroup == group && group != groups[i])
supgroup = groups[i];
if (supgroup == group && group != groups[i]) {
if (getgrgid (groups[i]))
supgroup = groups[i];
}
if (notgroup <= groups[i])
notgroup = groups[i] + 1;
}
......
......@@ -78,8 +78,10 @@
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <grp.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment