Skip to content

Commit

Permalink
Fix verification of start hook without a rootfs
Browse files Browse the repository at this point in the history
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
dpward authored and stgraber committed Aug 27, 2015
1 parent 459b871 commit 5c4d65d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lxc/conf.c
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 5c4d65d

Please sign in to comment.