Skip to content

Commit

Permalink
Merge pull request #88 from giuseppe/fix-private-cgroup-ns
Browse files Browse the repository at this point in the history
libcrun: fix creating a new cgroup ns
  • Loading branch information
rhatdan authored Sep 13, 2019
2 parents 6adde2d + e4a2370 commit 6a2c111
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/libcrun/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,6 @@ container_entrypoint_init (void *args, const char *notify_socket,
if (UNLIKELY (ret < 0))
return ret;

ret = libcrun_container_enter_cgroup_ns (container, err);
if (UNLIKELY (ret < 0))
return ret;

ret = sync_socket_send_sync (sync_socket, false, err);
if (UNLIKELY (ret < 0))
return ret;
Expand Down
4 changes: 4 additions & 0 deletions src/libcrun/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,10 @@ libcrun_set_mounts (libcrun_container_t *container, const char *rootfs, libcrun_
get_private_data (container)->remounts = r;
}

ret = libcrun_container_enter_cgroup_ns (container, err);
if (UNLIKELY (ret < 0))
return ret;

ret = do_mounts (container, rootfs, err);
if (UNLIKELY (ret < 0))
return ret;
Expand Down

0 comments on commit 6a2c111

Please sign in to comment.