sandbox: paths must be bind mounted in order of their length

This commit is contained in:
Albert S. 2019-08-11 21:03:50 +02:00
父節點 5656d3208f
當前提交 cc47b2823e
共有 1 個檔案被更改,包括 1 行新增0 行删除

查看文件

@ -90,6 +90,7 @@ bool SandboxLinux::bindMountPaths(std::string target_root, std::initializer_list
bool SandboxLinux::isolateNamespaces(std::vector<std::string> fsPaths)
{
std::sort(fsPaths.begin(), fsPaths.end(), [](const std::string &a, const std::string &b){ return a.length() < b.length(); });
auto current_uid = getuid();
auto current_gid = getgid();