From: David Ward Date: Tue, 23 Jun 2015 14:57:20 +0000 (-0400) Subject: Fix verification of start hook without a rootfs X-Git-Tag: lxc-2.0.0.beta1~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b6753e710af1c303e423ab5e8f0440ce75b4b94;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 d02dc8382..3519f57ab 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3639,12 +3639,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; } @@ -3744,7 +3744,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;