]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/condition.c
core: add @system special value to ConditionUser=
[thirdparty/systemd.git] / src / shared / condition.c
index 7320b534926e21a82d5530a8df081023a2d08182..28b328080a6f83ad6ef42bfef88049da23402a0c 100644 (file)
@@ -154,6 +154,9 @@ static int condition_test_user(Condition *c) {
         if (r >= 0)
                 return id == getuid() || id == geteuid();
 
+        if (streq("@system", c->parameter))
+                return getuid() <= SYSTEM_UID_MAX || geteuid() <= SYSTEM_UID_MAX;
+
         username = getusername_malloc();
         if (!username)
                 return -ENOMEM;