richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
9fc0f6
From d4b53c89833bf8dc934eee8a19bd3b112135fe71 Mon Sep 17 00:00:00 2001
9fc0f6
From: Lennart Poettering <lennart@poettering.net>
9fc0f6
Date: Wed, 20 Nov 2013 03:44:11 +0100
9fc0f6
Subject: [PATCH] manager: don't do plymouth in a container
9fc0f6
9fc0f6
Given that plymouth listens on an abstract namespace socket and if
9fc0f6
CLONE_NEWNET is not used the abstract namespace is shared with the host
9fc0f6
we might actually end up send plymouth data to the host.
9fc0f6
---
9fc0f6
 src/core/manager.c | 3 +++
9fc0f6
 1 file changed, 3 insertions(+)
9fc0f6
9fc0f6
diff --git a/src/core/manager.c b/src/core/manager.c
9fc0f6
index ce32baf..944c196 100644
9fc0f6
--- a/src/core/manager.c
9fc0f6
+++ b/src/core/manager.c
9fc0f6
@@ -1966,6 +1966,9 @@ void manager_send_unit_plymouth(Manager *m, Unit *u) {
9fc0f6
         if (m->running_as != SYSTEMD_SYSTEM)
9fc0f6
                 return;
9fc0f6
 
9fc0f6
+        if (detect_container(NULL) > 0)
9fc0f6
+                return;
9fc0f6
+
9fc0f6
         if (u->type != UNIT_SERVICE &&
9fc0f6
             u->type != UNIT_MOUNT &&
9fc0f6
             u->type != UNIT_SWAP)