]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dbus-cgroup: Make sure we overwrite cpuset properties in drop-in
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 30 Jun 2023 14:06:54 +0000 (16:06 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 30 Jun 2023 19:59:32 +0000 (21:59 +0200)
The DBUS property setter overwrites the value of the property but
writes a drop-in that extends the value. Let's make sure the drop-in
overwrites the property value as well by assigning the empty string
first.

src/core/dbus-cgroup.c

index 59d7a3ba71fe0a0896921162db930d5fee46adf9..9ab806b22d7bbabc37222c4e903bf3c6f05fc771 100644 (file)
@@ -1336,7 +1336,7 @@ int bus_cgroup_set_property(
                         new_set = (CPUSet) {};
 
                         unit_invalidate_cgroup(u, CGROUP_MASK_CPUSET);
-                        unit_write_settingf(u, flags, name, "%s=%s", name, setstr);
+                        unit_write_settingf(u, flags, name, "%s=\n%s=%s", name, name, setstr);
                 }
 
                 return 1;