Skip to content

Commit

Permalink
dbus-cgroup: Make sure we overwrite cpuset properties in drop-in
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit 1dbccd6)
  • Loading branch information
DaanDeMeyer authored and bluca committed Jul 7, 2023
1 parent 67aaab3 commit 72d6e89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/dbus-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,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;
Expand Down

0 comments on commit 72d6e89

Please sign in to comment.