-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(isolation): add directory support for UhyveFileMap
If the guest path is part of a directory that is not mapped, we'll recursively look for the parent directories and check if the parent directories are mapped. If that's the case, we'll use the file in the mapped host directory instead. This feature also comes with a unit test. We partially rely on PathBuf to prevent any funny behavior from taking place. A current flaw of this approach is that the filename that can be found in the OpenParams struct is "relative" instead of absolute, and providing paths that are otherwise whitelisted (e.g. "/root/file.txt" instead of "file.txt") will result in the map not return a result.
- Loading branch information
Showing
1 changed file
with
109 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters