Skip to content

Commit

Permalink
Fix namespace config parse error
Browse files Browse the repository at this point in the history
Signed-off-by: LiFeng <lifeng68@huawei.com>
  • Loading branch information
lifeng68 committed Nov 20, 2017
1 parent c4e7852 commit 7164956
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/confile_utils.c
Expand Up @@ -759,8 +759,8 @@ int lxc_inherit_namespace(const char *lxcname_or_pid, const char *lxcpath,
if (!dup)
return -ENOMEM;

*lastslash = '\0';
pid = lxc_container_name_to_pid(lastslash, dup);
dup[lastslash - lxcname_or_pid] = '\0';
pid = lxc_container_name_to_pid(lastslash + 1, dup);
free(dup);
} else {
pid = lxc_container_name_to_pid(lxcname_or_pid, lxcpath);
Expand Down

0 comments on commit 7164956

Please sign in to comment.