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-26 12:07:54 +09:00
committed by Yu Watanabe
parent 6e3c443b56
commit 98cd752a28
+1 -1
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);