Commit 9fd7525a authored by Alex Gough's avatar Alex Gough Committed by Commit Bot

Use ReadOnlyFile in archive analyzer

The output or temp files do need to be writeable, but the input files
do not, e.g. https://source.chromium.org/chromium/chromium/src/+/master:chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.cc;l=45;bpv=1;bpt=1

Bug: 1130762
Change-Id: I22773721de3ec35c920e45f3a1ec29e4a31d32dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2486458Reviewed-by: default avatarNathan Parker <nparker@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819946}
parent 475bc34a
......@@ -9,24 +9,25 @@
module chrome.mojom;
import "mojo/public/mojom/base/file.mojom";
import "mojo/public/mojom/base/read_only_file.mojom";
interface SafeArchiveAnalyzer {
// Build flag FULL_SAFE_BROWSING: Analyze the |zip_file| for malicious
// download protection, given a |temporary_file| used to extract files
// from the |zip_file| archive.
AnalyzeZipFile(mojo_base.mojom.File zip_file,
AnalyzeZipFile(mojo_base.mojom.ReadOnlyFile zip_file,
mojo_base.mojom.File temporary_file)
=> (SafeArchiveAnalyzerResults results);
// Build flag FULL_SAFE_BROWSING, on OS_MAC: Analyze the |dmg_file|
// for malicious download protection.
AnalyzeDmgFile(mojo_base.mojom.File dmg_file)
AnalyzeDmgFile(mojo_base.mojom.ReadOnlyFile dmg_file)
=> (SafeArchiveAnalyzerResults results);
// Build flag FULL_SAFE_BROWSING: Analyze the |rar_file| for malicious
// download protection. Uses the |temporary_file| to extract files from the
// |rar_file| archive.
AnalyzeRarFile(mojo_base.mojom.File rar_file,
AnalyzeRarFile(mojo_base.mojom.ReadOnlyFile rar_file,
mojo_base.mojom.File temporary_file)
=> (SafeArchiveAnalyzerResults results);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment