chiark / gitweb /
manager: don't do plymouth in a container
authorLennart Poettering <lennart@poettering.net>
Wed, 20 Nov 2013 02:44:11 +0000 (03:44 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Nov 2013 19:58:17 +0000 (20:58 +0100)
Given that plymouth listens on an abstract namespace socket and if
CLONE_NEWNET is not used the abstract namespace is shared with the host
we might actually end up send plymouth data to the host.

src/core/manager.c

index 86de0e3fbfad4eb003254392d89ce8962a2b9630..dd0d83d1160a9e79999bd25767d882c663d14e18 100644 (file)
@@ -1806,6 +1806,9 @@ void manager_send_unit_plymouth(Manager *m, Unit *u) {
         if (m->running_as != SYSTEMD_SYSTEM)
                 return;
 
         if (m->running_as != SYSTEMD_SYSTEM)
                 return;
 
+        if (detect_container(NULL) > 0)
+                return;
+
         if (u->type != UNIT_SERVICE &&
             u->type != UNIT_MOUNT &&
             u->type != UNIT_SWAP)
         if (u->type != UNIT_SERVICE &&
             u->type != UNIT_MOUNT &&
             u->type != UNIT_SWAP)