test-condition: fix group check condition

We were checking the uid, whereas we should have checked the gid
This commit is contained in:
Felipe Sateler 2019-12-23 22:04:44 -03:00 committed by Yu Watanabe
parent 6e3c443b56
commit 98cd752a28

View file

@ -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);