]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: 0% and 100% should be valid for UserTasksMax (#3836)
authorTejun Heo <htejun@fb.com>
Mon, 1 Aug 2016 01:38:47 +0000 (21:38 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 1 Aug 2016 01:38:47 +0000 (21:38 -0400)
config_parse_user_tasks_max() was incorrectly accepting percentage value
between 1 and 99.  Update it to accept 0% and 100%.  This brings it in line
with TasksMax handling in systemd.

src/login/logind-user.c

index 348e3962927528f30799239049968afb1056abef..63363035e715433cd8c4411e325c9c4dad73881b 100644 (file)
@@ -893,7 +893,7 @@ int config_parse_user_tasks_max(
 
         /* First, try to parse as percentage */
         r = parse_percent(rvalue);
-        if (r > 0 && r < 100)
+        if (r >0)
                 k = system_tasks_max_scale(r, 100U);
         else {