| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 1 #include "debug.h" | 5 #include "debug.h" |
| 2 #include "sandbox_impl.h" | 6 #include "sandbox_impl.h" |
| 3 | 7 |
| 4 namespace playground { | 8 namespace playground { |
| 5 | 9 |
| 6 int Sandbox::sandbox_stat(const char *path, void *buf) { | 10 int Sandbox::sandbox_stat(const char *path, void *buf) { |
| 7 Debug::syscall(__NR_stat, "Executing handler"); | 11 Debug::syscall(__NR_stat, "Executing handler"); |
| 8 size_t len = strlen(path); | 12 size_t len = strlen(path); |
| 9 struct Request { | 13 struct Request { |
| 10 int sysnum; | 14 int sysnum; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 (ssize_t)stat_req.path_length) { | 150 (ssize_t)stat_req.path_length) { |
| 147 goto read_parm_failed; | 151 goto read_parm_failed; |
| 148 } | 152 } |
| 149 tmp[stat_req.path_length] = '\000'; | 153 tmp[stat_req.path_length] = '\000'; |
| 150 Debug::message(("Denying access to \"" + std::string(tmp) + "\"").c_str()); | 154 Debug::message(("Denying access to \"" + std::string(tmp) + "\"").c_str()); |
| 151 SecureMem::abandonSystemCall(threadFd, -EACCES); | 155 SecureMem::abandonSystemCall(threadFd, -EACCES); |
| 152 return false; | 156 return false; |
| 153 } | 157 } |
| 154 | 158 |
| 155 } // namespace | 159 } // namespace |
| OLD | NEW |