From: David Ward Date: Tue, 23 Jun 2015 14:57:34 +0000 (-0400) Subject: Fix verification of start hook without a rootfs X-Git-Tag: lxc-1.0.8~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c4d65db57b2e396957e04d0ab25a7df14a70d03;p=thirdparty%2Flxc.git Fix verification of start hook without a rootfs Signed-off-by: David Ward Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 1d1cfb2ed..e1b8a6ce8 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4094,12 +4094,12 @@ static bool verify_start_hooks(struct lxc_conf *conf) int ret; ret = snprintf(path, MAXPATHLEN, "%s%s", - conf->rootfs.mount, hookname); + conf->rootfs.path ? conf->rootfs.mount : "", hookname); if (ret < 0 || ret >= MAXPATHLEN) return false; ret = stat(path, &st); if (ret) { - SYSERROR("Start hook %s not found in container rootfs", + SYSERROR("Start hook %s not found in container", hookname); return false; } @@ -4162,7 +4162,7 @@ int lxc_setup(struct lxc_handler *handler) return -1; } - /* Make sure any start hooks are in the rootfs */ + /* Make sure any start hooks are in the container */ if (!verify_start_hooks(lxc_conf)) return -1;