| 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_access(const char *pathname, int mode) { | 10 int Sandbox::sandbox_access(const char *pathname, int mode) { |
| 7 Debug::syscall(__NR_access, "Executing handler"); | 11 Debug::syscall(__NR_access, "Executing handler"); |
| 8 size_t len = strlen(pathname); | 12 size_t len = strlen(pathname); |
| 9 struct Request { | 13 struct Request { |
| 10 int sysnum; | 14 int sysnum; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 "\"").c_str()); | 72 "\"").c_str()); |
| 69 | 73 |
| 70 // Tell trusted thread to access the file. | 74 // Tell trusted thread to access the file. |
| 71 SecureMem::sendSystemCall(threadFdPub, true, parentMapsFd, mem, __NR_access, | 75 SecureMem::sendSystemCall(threadFdPub, true, parentMapsFd, mem, __NR_access, |
| 72 mem->pathname - (char*)mem + (char*)mem->self, | 76 mem->pathname - (char*)mem + (char*)mem->self, |
| 73 access_req.mode); | 77 access_req.mode); |
| 74 return true; | 78 return true; |
| 75 } | 79 } |
| 76 | 80 |
| 77 } // namespace | 81 } // namespace |
| OLD | NEW |