From 98cd752a285c0fba84b8d98f3ba255ed4d11c881 Mon Sep 17 00:00:00 2001 From: Felipe Sateler Date: Mon, 23 Dec 2019 22:04:44 -0300 Subject: [PATCH] test-condition: fix group check condition We were checking the uid, whereas we should have checked the gid --- src/test/test-condition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test-condition.c b/src/test/test-condition.c index fce9232dcf..28b5b780c3 100644 --- a/src/test/test-condition.c +++ b/src/test/test-condition.c @@ -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);