29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
From 98cd752a285c0fba84b8d98f3ba255ed4d11c881 Mon Sep 17 00:00:00 2001
|
|
From: Felipe Sateler <fsateler@gmail.com>
|
|
Date: Mon, 23 Dec 2019 22:04:44 -0300
|
|
Subject: [PATCH 1095/1760] test-condition: fix group check condition
|
|
|
|
We were checking the uid, whereas we should have checked the gid
|
|
Reference: https://github.com/systemd/systemd/commit/98cd752a285c0fba84b8d98f3ba255ed4d11c881
|
|
Conflict: NA
|
|
---
|
|
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 fce9232..28b5b78 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);
|
|
--
|
|
1.8.3.1
|
|
|