Unset any groups when entering the container
This commit is contained in:
parent
d12b91ecbe
commit
88acea0899
1 changed files with 2 additions and 0 deletions
|
|
@ -30,6 +30,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <grp.h>
|
||||||
|
|
||||||
namespace fs = boost::filesystem;
|
namespace fs = boost::filesystem;
|
||||||
|
|
||||||
|
|
@ -75,6 +76,7 @@ int ContainerConnector::run(const std::string &path) {
|
||||||
|
|
||||||
setuid(0);
|
setuid(0);
|
||||||
setgid(0);
|
setgid(0);
|
||||||
|
setgroups(0, nullptr);
|
||||||
|
|
||||||
chdir("/");
|
chdir("/");
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue