This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Pal/Linux-SGX] Refactor
file_open
and load_trusted_file
functions
This commit moves all possible checks (file must be in a set of protected, trusted, allowed files from the manifest; trusted files cannot be created; etc.) before actual opening of the file in `file_open`. As a side effect, this fixes a bug when an app wants to open an unknown file for write/append -- previously, Graphene would open such file, possibly truncate it and only then return an error. Also, LibOS regression tests were enhanced to check for this case. Also, this commit splits `load_trusted_file` into `get_trusted_or_allowed_file` and `load_trusted_or_allowed_file` and also refactors a few other other auxilary functions. Co-authored-by: Michał Kowalczyk <[email protected]> Signed-off-by: Dmitrii Kuvaiskii <[email protected]> Signed-off-by: Michał Kowalczyk <[email protected]>
- Loading branch information
Showing
17 changed files
with
560 additions
and
417 deletions.
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
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
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
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
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
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
Oops, something went wrong.