Skip to content

Commit

Permalink
test-condition: fix group check condition
Browse files Browse the repository at this point in the history
We were checking the uid, whereas we should have checked the gid
  • Loading branch information
fsateler authored and yuwata committed Dec 26, 2019
1 parent 6e3c443 commit 98cd752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/test-condition.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ static void test_condition_test_group(void) {
condition_free(condition);
free(gid);

groupname = (char*)(geteuid() == 0 ? NOBODY_GROUP_NAME : "root");
groupname = (char*)(getegid() == 0 ? NOBODY_GROUP_NAME : "root");
condition = condition_new(CONDITION_GROUP, groupname, false, false);
assert_se(condition);
r = condition_test(condition);
Expand Down

0 comments on commit 98cd752

Please sign in to comment.