1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-09 12:58:26 +03:00

core/cgroup: fix setting SocketBindAllow=/SocketBindDeny= through DBus

This commit is contained in:
Yu Watanabe 2023-05-28 15:46:14 +09:00
parent 89e9df12b3
commit cc4d38b14b

View File

@ -2118,12 +2118,14 @@ int bus_cgroup_set_property(
if (!f)
return -ENOMEM;
fprintf(f, "%s:", name);
LIST_FOREACH(socket_bind_items, item, *list)
cgroup_context_dump_socket_bind_item(item, f);
fputc('\n', f);
if (n == 0)
fprintf(f, "%s=\n", name);
else
LIST_FOREACH(socket_bind_items, item, *list) {
fprintf(f, "%s=", name);
cgroup_context_dump_socket_bind_item(item, f);
fputc('\n', f);
}
r = fflush_and_check(f);
if (r < 0)