Skip to content

Commit

Permalink
Merge pull request #2859 from stgraber/master
Browse files Browse the repository at this point in the history
mount: Allow over-mounting
  • Loading branch information
brauner committed Feb 16, 2019
2 parents 4d3d037 + c00d0e3 commit eba282e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/lxc/lxccontainer.c
Expand Up @@ -5071,10 +5071,12 @@ static int do_lxcapi_mount(struct lxc_container *c, const char *source,
_exit(EXIT_FAILURE);
}

ret = create_mount_target(target, sb.st_mode);
if (ret < 0)
_exit(EXIT_FAILURE);
TRACE("Created mount target \"%s\"", target);
if (access(target, F_OK) < 0 && errno == ENOENT) {
ret = create_mount_target(target, sb.st_mode);
if (ret < 0)
_exit(EXIT_FAILURE);
TRACE("Created mount target \"%s\"", target);
}

suff = strrchr(template, '/');
if (!suff)
Expand Down

0 comments on commit eba282e

Please sign in to comment.