提交 4fb706a5 编写于 作者: C Cole Robinson

lxc: Verify root fs exists before mounting

Otherwise the following virFileMakePath will create the directory for
us and fail further ahead, which probably isn't intended.
上级 a7e2dd1c
......@@ -664,6 +664,14 @@ lxcControllerRun(virDomainDefPtr def,
*/
if (root) {
VIR_DEBUG("Setting up private /dev/pts");
if (!virFileExists(root->src)) {
virReportSystemError(errno,
_("root source %s does not exist"),
root->src);
goto cleanup;
}
if (unshare(CLONE_NEWNS) < 0) {
virReportSystemError(errno, "%s",
_("Cannot unshare mount namespace"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册