diff --git a/sandbox/sandbox-linux.cpp b/sandbox/sandbox-linux.cpp index 585d686..ad31d49 100644 --- a/sandbox/sandbox-linux.cpp +++ b/sandbox/sandbox-linux.cpp @@ -91,6 +91,8 @@ bool SandboxLinux::bindMountPaths(std::string target_root, std::initializer_list bool SandboxLinux::isolateNamespaces(std::vector 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();