]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: fix resetting of Delegate= and properly ignore invalid assignment
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 18 Apr 2018 17:50:07 +0000 (19:50 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 18 Apr 2018 18:07:00 +0000 (20:07 +0200)
The default is false not true. If we say "ignoring" we must return 0.

src/core/load-fragment.c

index 767355adf6d866c9e9da8a0b3e3e602ab1c5e160..403c0afd579e619fb937af4eaa463ee1b3fd4588 100644 (file)
@@ -3411,7 +3411,7 @@ int config_parse_delegate(
          * mask to delegate. */
 
         if (isempty(rvalue)) {
-                c->delegate = true;
+                c->delegate = false;
                 c->delegate_controllers = 0;
                 return 0;
         }
@@ -3432,7 +3432,7 @@ int config_parse_delegate(
                                 return log_oom();
                         if (r < 0) {
                                 log_syntax(unit, LOG_ERR, filename, line, r, "Invalid syntax, ignoring: %s", rvalue);
-                                return r;
+                                return 0;
                         }
 
                         cc = cgroup_controller_from_string(word);