| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "debug.h" | 5 #include "debug.h" |
| 6 #include "sandbox_impl.h" | 6 #include "sandbox_impl.h" |
| 7 | 7 |
| 8 namespace playground { | 8 namespace playground { |
| 9 | 9 |
| 10 #if defined(__NR_sigaction) | 10 #if defined(__NR_sigaction) |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 die("Failed to read parameters for sigaction() [process]"); | 133 die("Failed to read parameters for sigaction() [process]"); |
| 134 } | 134 } |
| 135 if (sigaction_req.signum == SIGSEGV) { | 135 if (sigaction_req.signum == SIGSEGV) { |
| 136 // This should never happen. Something went wrong when intercepting the | 136 // This should never happen. Something went wrong when intercepting the |
| 137 // system call. This is not a security problem, but it clearly doesn't | 137 // system call. This is not a security problem, but it clearly doesn't |
| 138 // make sense to let the system call pass. | 138 // make sense to let the system call pass. |
| 139 SecureMem::abandonSystemCall(*info, -EINVAL); | 139 SecureMem::abandonSystemCall(*info, -EINVAL); |
| 140 return false; | 140 return false; |
| 141 } | 141 } |
| 142 SecureMem::sendSystemCall(*info, SecureMem::SEND_UNLOCKED, | 142 SecureMem::sendSystemCall(*info, SecureMem::SEND_UNLOCKED, |
| 143 sigaction_req.signum, sigaction_req.action, | 143 sigaction_req.signum, |
| 144 sigaction_req.old_action, sigaction_req.sigsetsize); | 144 const_cast<SysCalls::kernel_sigaction*>(sigaction_req.action), |
| 145 const_cast<SysCalls::kernel_sigaction*>(sigaction_req.old_action), |
| 146 sigaction_req.sigsetsize); |
| 145 return true; | 147 return true; |
| 146 } | 148 } |
| 147 | 149 |
| 148 } // namespace | 150 } // namespace |
| OLD | NEW |