| 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_open(const char *pathname, int flags, mode_t mode) { | 10 int Sandbox::sandbox_open(const char *pathname, int flags, mode_t mode) { |
| 7 Debug::syscall(__NR_open, "Executing handler"); | 11 Debug::syscall(__NR_open, "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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 "\"").c_str()); | 87 "\"").c_str()); |
| 84 | 88 |
| 85 // Tell trusted thread to open the file. | 89 // Tell trusted thread to open the file. |
| 86 SecureMem::sendSystemCall(threadFdPub, true, parentMapsFd, mem, __NR_open, | 90 SecureMem::sendSystemCall(threadFdPub, true, parentMapsFd, mem, __NR_open, |
| 87 mem->pathname - (char*)mem + (char*)mem->self, | 91 mem->pathname - (char*)mem + (char*)mem->self, |
| 88 open_req.flags, open_req.mode); | 92 open_req.flags, open_req.mode); |
| 89 return true; | 93 return true; |
| 90 } | 94 } |
| 91 | 95 |
| 92 } // namespace | 96 } // namespace |
| OLD | NEW |