nspawn: sync DeviceAllow= setting with systemd-nspawn@.service

Follow-up for dc3223919f.
Addresses https://github.com/systemd/systemd/pull/34067#discussion_r1748592958.

Otherwise, containers started with and without --keep-unit option run in
different device policies.
This commit is contained in:
Yu Watanabe
2024-09-10 04:38:11 +09:00
parent 8b29949a41
commit b86b90cec5
2 changed files with 1 additions and 4 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ static int append_machine_properties(
return bus_log_create_error(r);
if (enable_fuse) {
r = sd_bus_message_append(m, "(sv)", "DeviceAllow", "a(ss)", 1,
"/dev/fuse", "rw");
"/dev/fuse", "rwm");
if (r < 0)
return bus_log_create_error(r);
}