int ctx_is_new;
struct sliver_resources slr;
char hostname[HOST_NAME_MAX+1];
+ int unshare_netns;
+
pl_get_limits(context,&slr);
if (gethostname(hostname, sizeof hostname) == -1)
fprintf(stderr, "*** %s: %s has zero cpu resources and presumably it has been disabled/suspended ***\n", hostname, context);
exit(0);
}
+
+ unshare_netns = pl_unshare_netns(ctx);
(void) (sandbox_chroot(pwd));
- if ((ctx_is_new = pl_chcontext(ctx, ~vc_get_insecurebcaps(),&slr)) < 0)
+ if ((ctx_is_new = pl_chcontext(ctx, ~vc_get_insecurebcaps(),&slr,
+ unshare_netns)) < 0)
{
PERROR("pl_chcontext(%u)", ctx);
exit(1);