Re: [PATCH 3/3] Make lxcContainerSetStdio the last thing to be called in container startup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/01/2012 06:10 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"<berrange@xxxxxxxxxx>

Once lxcContainerSetStdio is invoked, logging will not work as
expected in libvirt_lxc. So make sure this is the last thing to
be called, in particular after setting the security process label
---
  src/lxc/lxc_container.c |    8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 9bb6218..0636eab 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -1366,14 +1366,14 @@ static int lxcContainerChild( void *data )
          goto cleanup;
      }

-    if (lxcContainerSetStdio(argv->monitor, ttyfd, argv->handshakefd)<  0) {
-        goto cleanup;
-    }
-
      VIR_DEBUG("Setting up security labeling");
      if (virSecurityManagerSetProcessLabel(argv->securityDriver, vmDef)<  0)
          goto cleanup;

+    if (lxcContainerSetStdio(argv->monitor, ttyfd, argv->handshakefd)<  0) {
+        goto cleanup;
+    }
+
      ret = 0;
  cleanup:
      VIR_FREE(ttyPath);

ACK

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]