mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-03 23:38:39 +00:00
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.
This commit is contained in:
+1
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user