mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-25 06:03:40 +03:00
test-condition: don't assume that all non-root users are normal users (#6409)
Automated builders may run under a dedicated system user, and this test would fail that Fixes #6366
This commit is contained in:
parent
5588612e9e
commit
708d423915
@ -390,7 +390,7 @@ static void test_condition_test_user(void) {
|
||||
assert_se(condition);
|
||||
r = condition_test(condition);
|
||||
log_info("ConditionUser=@system → %i", r);
|
||||
if (geteuid() == 0)
|
||||
if (getuid() < SYSTEM_UID_MAX || geteuid() < SYSTEM_UID_MAX)
|
||||
assert_se(r > 0);
|
||||
else
|
||||
assert_se(r == 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user