mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 12:05:17 +00:00
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)
This commit is contained in:
parent
e36af9f8c1
commit
588b16bbd5
@ -1366,14 +1366,14 @@ static int lxcContainerChild( void *data )
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lxcContainerSetStdio(argv->monitor, ttyfd, argv->handshakefd) < 0) {
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
VIR_DEBUG("Setting up security labeling");
|
VIR_DEBUG("Setting up security labeling");
|
||||||
if (virSecurityManagerSetProcessLabel(argv->securityDriver, vmDef) < 0)
|
if (virSecurityManagerSetProcessLabel(argv->securityDriver, vmDef) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
if (lxcContainerSetStdio(argv->monitor, ttyfd, argv->handshakefd) < 0) {
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(ttyPath);
|
VIR_FREE(ttyPath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user