From: Daniel P. Berrange Date: Tue, 1 May 2012 09:48:52 +0000 (+0100) Subject: Make lxcContainerSetStdio the last thing to be called in container startup X-Git-Tag: v0.9.11.4~125 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=588b16bbd524fbc39535452bf5637c1e9c7f4ff2;p=thirdparty%2Flibvirt.git 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 (cherry picked from commit 07cf96ecc7b0933c67febb1c5bd50fc0bbeba263) --- 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);