From: Felipe Sateler Date: Tue, 24 Dec 2019 01:04:44 +0000 (-0300) Subject: test-condition: fix group check condition X-Git-Tag: v245-rc1~216 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98cd752a285c0fba84b8d98f3ba255ed4d11c881;p=thirdparty%2Fsystemd.git test-condition: fix group check condition We were checking the uid, whereas we should have checked the gid --- diff --git a/src/test/test-condition.c b/src/test/test-condition.c index fce9232dcfe..28b5b780c35 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);