Skip to content

Commit f2f4a1e

Browse files
committed
Make sure the new runtime dir exists before mounting.
This seems to be required under some choices of runtime dir. Also clean up some redundant logging. Signed-off-by: Sebastien Dabdoub <[email protected]>
1 parent 96a64d3 commit f2f4a1e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bindings.c

+5
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,11 @@ static int permute_prepare(void)
762762
return -1;
763763
}
764764

765+
if (!mkdir_p(new_runtime, 0755)) {
766+
lxcfs_error("Failed to create dir %s\n", new_runtime);
767+
return -1;
768+
}
769+
765770
if (mount(runtime_path, new_runtime, NULL, MS_BIND, 0) < 0) {
766771
lxcfs_error("Failed to bind-mount %s into new root: %s.\n", runtime_path, strerror(errno));
767772
return -1;

0 commit comments

Comments
 (0)