]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-condition.c
user-util: add new uid_is_system() helper
[thirdparty/systemd.git] / src / test / test-condition.c
index 31e08b2318ada66e2a06b939def8c838e34cf1f7..d43db3a7cd68c92248a74e1ca2665489aea18f33 100644 (file)
@@ -391,7 +391,7 @@ static void test_condition_test_user(void) {
         assert_se(condition);
         r = condition_test(condition);
         log_info("ConditionUser=@system → %i", r);
-        if (getuid() < SYSTEM_UID_MAX || geteuid() < SYSTEM_UID_MAX)
+        if (uid_is_system(getuid()) || uid_is_system(geteuid()))
                 assert_se(r > 0);
         else
                 assert_se(r == 0);