| Index: components/nacl/browser/nacl_browser.cc
|
| diff --git a/components/nacl/browser/nacl_browser.cc b/components/nacl/browser/nacl_browser.cc
|
| index 45c7648c622dba5c9d3f280ae1d1a0c4c13bc81b..21584505a0910366dad8dcf09ae2375962668a7e 100644
|
| --- a/components/nacl/browser/nacl_browser.cc
|
| +++ b/components/nacl/browser/nacl_browser.cc
|
| @@ -113,15 +113,19 @@ const int64 kCrashesIntervalInSeconds = 120;
|
|
|
| namespace nacl {
|
|
|
| -base::File OpenNaClExecutableImpl(const base::FilePath& file_path) {
|
| +base::File OpenNaClReadExecImpl(const base::FilePath& file_path,
|
| + bool is_executable) {
|
| // Get a file descriptor. On Windows, we need 'GENERIC_EXECUTE' in order to
|
| // memory map the executable.
|
| // IMPORTANT: This file descriptor must not have write access - that could
|
| // allow a NaCl inner sandbox escape.
|
| base::File file(file_path,
|
| + is_executable ?
|
| (base::File::FLAG_OPEN |
|
| base::File::FLAG_READ |
|
| - base::File::FLAG_EXECUTE)); // Windows only flag.
|
| + base::File::FLAG_EXECUTE) : // Windows only flag.
|
| + (base::File::FLAG_OPEN |
|
| + base::File::FLAG_READ));
|
| if (!file.IsValid())
|
| return file.Pass();
|
|
|
|
|