nspawn: make sure we install the device policy if nspawn is run as unit as on the command line

This commit is contained in:
Lennart Poettering
2015-04-28 21:34:23 +02:00
parent a509f0e631
commit 773ce3d89c
2 changed files with 18 additions and 0 deletions
+4
View File
@@ -2014,6 +2014,10 @@ static int register_machine(pid_t pid, int local_ifindex) {
if (r < 0)
return bus_log_create_error(r);
/* If you make changes here, also make sure to update
* systemd-nspawn@.service, to keep the device
* policies in sync regardless if we are run with or
* without the --keep-unit switch. */
r = sd_bus_message_append(m, "(sv)", "DeviceAllow", "a(ss)", 9,
/* Allow the container to
* access and create the API