From e8d9c6475eb42fdb1775a465353758f2c5418938 Mon Sep 17 00:00:00 2001 From: lifeng68 Date: Sat, 31 Oct 2020 17:38:04 +0800 Subject: [PATCH 8/9] hook: pass correct mount dir as root to hook Signed-off-by: lifeng68 --- src/lxc/conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 6a25b96ac..3d8713954 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4785,7 +4785,7 @@ static int do_run_oci_hooks(const char *name, const char *lxcpath, struct lxc_co return 0; } - rootpath = get_root_path(lc->rootfs.path, lc->rootfs.bdev_type); + rootpath = get_root_path(lc->rootfs.path ? lc->rootfs.mount : NULL, lc->rootfs.bdev_type); if (!rootpath) { ERROR("Get container %s rootpath failed.", name); return -1; -- 2.25.1