mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
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.
This commit is contained in:
parent
a7e2dd1c32
commit
4fb706a5a7
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user