From 07cf96ecc7b0933c67febb1c5bd50fc0bbeba263 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Tue, 1 May 2012 10:48:52 +0100 Subject: [PATCH] Make lxcContainerSetStdio the last thing to be called in container startup 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 9bb6218393..0636eabce4 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); -- GitLab