summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-01-18 23:54:42 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2015-01-18 23:54:42 +0100
commit90b99192ad5b7674585996e2b801679989f8a8a7 (patch)
tree8e278b40dda7b3030623d8b5dce58d5535f1461e /src
parent9c89c1cabd0357fa4e58a91c4d9233702896b709 (diff)
core: write kdbus.attach_flags_mask only on real boot
The kernel module system is not namespaced, so no container should ever modify global options. Make sure we set the kdbus attach_flags_mask only on a real boot as PID1.
Diffstat (limited to 'src')
-rw-r--r--src/core/manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index e53f22215d..64ff4644a8 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -708,7 +708,7 @@ static int manager_setup_kdbus(Manager *m) {
if (m->test_run || m->kdbus_fd >= 0)
return 0;
- if (getpid() == 1)
+ if (m->running_as == SYSTEMD_SYSTEM && detect_container(NULL) <= 0)
bus_kernel_fix_attach_mask();
m->kdbus_fd = bus_kernel_create_bus(