Validate source and mount path.
This CL add validations of the source and mount path to ensure:
1. The source path is fully canonicalized before being checked by the
CanMount() method of a mount manager.
2. The mount path must be an immediate child of the mount root
directory of a mount manager.
TEST=Tested the following:
1. Build and run unit tests.
2. Run the following tests:
3. Verify that Files.app can mount an external USB drive.
4. Verify that Files.app can open a ZIP file from:
- user's Downloads directory
- an external USB drive
- within another ZIP file
Reviewed-by: Ben Chan <email@example.com>
Commit-Queue: Ben Chan <firstname.lastname@example.org>
Tested-by: Ben Chan <email@example.com>
Reviewed-by: Kees Cook <firstname.lastname@example.org>
Reviewed-by: Jorge Lucangeli Obes <email@example.com>
7 files changed