Skip to content

Commit

Permalink
b5-enter: support building without unshare cgroup support
Browse files Browse the repository at this point in the history
The current version of barney won't compile on the user servers
because they don't have CLONE_NEWCGROUP defined. This change provides
an option to compile a version of barney that doesn't need cgroup
support.

The default make operation will build without cgroup support. To build
a version with cgroup support, the syntax is:
sudo make install CFLAGS=-DHAVE_CLONE_NEWCGROUP=1

Change-Id: Icbc20bbe8e287ff298dba4563216fa54466b2827
  • Loading branch information
yabberyabber authored and Snaipe committed Jan 15, 2020
1 parent 3be59d0 commit b968e09
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions enter.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ static int opts_to_unshareflags(const struct entry_settings *opts)
if (opts->mount) {
flags |= CLONE_NEWNS;
}
#ifdef HAVE_CLONE_NEWCGROUP
if (opts->cgroup) {
flags |= CLONE_NEWCGROUP;
}
#endif
if (opts->ipc) {
flags |= CLONE_NEWIPC;
}
Expand Down

0 comments on commit b968e09

Please sign in to comment.