[lxc-devel] [PATCH stable-1.1 2/7] Fix verification of start hook without a rootfs
David Ward
david.ward at ll.mit.edu
Tue Jun 23 14:57:27 UTC 2015
Signed-off-by: David Ward <david.ward at ll.mit.edu>
---
src/lxc/conf.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 6a55b39..1f80e5c 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -3722,12 +3722,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;
}
@@ -3827,7 +3827,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;
--
1.7.1
More information about the lxc-devel
mailing list