| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "sandbox/linux/syscall_broker/broker_process.h" | 5 #include "sandbox/linux/syscall_broker/broker_process.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <signal.h> | 8 #include <signal.h> |
| 9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
| 10 #include <sys/syscall.h> | 10 #include <sys/syscall.h> |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 case BrokerHost::RequestStatus::LOST_CLIENT: | 91 case BrokerHost::RequestStatus::LOST_CLIENT: |
| 92 _exit(1); | 92 _exit(1); |
| 93 case BrokerHost::RequestStatus::SUCCESS: | 93 case BrokerHost::RequestStatus::SUCCESS: |
| 94 case BrokerHost::RequestStatus::FAILURE: | 94 case BrokerHost::RequestStatus::FAILURE: |
| 95 continue; | 95 continue; |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 _exit(1); | 98 _exit(1); |
| 99 } | 99 } |
| 100 NOTREACHED(); | 100 NOTREACHED(); |
| 101 return false; |
| 101 } | 102 } |
| 102 | 103 |
| 103 void BrokerProcess::CloseChannel() { | 104 void BrokerProcess::CloseChannel() { |
| 104 broker_client_.reset(); | 105 broker_client_.reset(); |
| 105 } | 106 } |
| 106 | 107 |
| 107 int BrokerProcess::Access(const char* pathname, int mode) const { | 108 int BrokerProcess::Access(const char* pathname, int mode) const { |
| 108 RAW_CHECK(initialized_); | 109 RAW_CHECK(initialized_); |
| 109 return broker_client_->Access(pathname, mode); | 110 return broker_client_->Access(pathname, mode); |
| 110 } | 111 } |
| 111 | 112 |
| 112 int BrokerProcess::Open(const char* pathname, int flags) const { | 113 int BrokerProcess::Open(const char* pathname, int flags) const { |
| 113 RAW_CHECK(initialized_); | 114 RAW_CHECK(initialized_); |
| 114 return broker_client_->Open(pathname, flags); | 115 return broker_client_->Open(pathname, flags); |
| 115 } | 116 } |
| 116 | 117 |
| 117 } // namespace syscall_broker | 118 } // namespace syscall_broker |
| 118 | 119 |
| 119 } // namespace sandbox. | 120 } // namespace sandbox. |
| OLD | NEW |