Commit 1680a3ce authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #1260 from abbradar/master

Fix test_filter_ipc for cleared supplementary groups
parents cb5eebd8 32b2d303
...@@ -122,8 +122,8 @@ int main (void) ...@@ -122,8 +122,8 @@ int main (void)
// Get the group and supplimental groups of the process owner // Get the group and supplimental groups of the process owner
gid_t groups[100]; gid_t groups[100];
int ngroups = getgroups(100, groups); int ngroups = getgroups(100, groups);
assert (ngroups != -1 && ngroups != 0); assert (ngroups != -1);
gid_t group = getgid(), supgroup = groups[0], notgroup = groups[ngroups - 1] + 1; gid_t group = getgid(), supgroup = group, notgroup = group + 1;
for (int i = 0; i < ngroups; i++) { for (int i = 0; i < ngroups; i++) {
if (supgroup == group && group != groups[i]) if (supgroup == group && group != groups[i])
supgroup = groups[i]; supgroup = groups[i];
......
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