| Index: sandbox/linux/syscall_broker/broker_process.cc
|
| diff --git a/sandbox/linux/syscall_broker/broker_process.cc b/sandbox/linux/syscall_broker/broker_process.cc
|
| index 66b7660af071412d3047aa16f32905d6ea722fdd..3b69ec553a023d720a4a83cce9b40da8e1477fd8 100644
|
| --- a/sandbox/linux/syscall_broker/broker_process.cc
|
| +++ b/sandbox/linux/syscall_broker/broker_process.cc
|
| @@ -28,6 +28,8 @@
|
|
|
| namespace sandbox {
|
|
|
| +namespace syscall_broker {
|
| +
|
| BrokerProcess::BrokerProcess(int denied_errno,
|
| const std::vector<std::string>& allowed_r_files,
|
| const std::vector<std::string>& allowed_w_files,
|
| @@ -85,11 +87,9 @@ bool BrokerProcess::Init(
|
| ipc_socketpair_ = socket_pair[1];
|
| is_child_ = false;
|
| broker_pid_ = child_pid;
|
| - broker_client_.reset(
|
| - new syscall_broker::BrokerClient(policy_,
|
| - ipc_socketpair_,
|
| - fast_check_in_client_,
|
| - quiet_failures_for_tests_));
|
| + broker_client_.reset(new BrokerClient(policy_, ipc_socketpair_,
|
| + fast_check_in_client_,
|
| + quiet_failures_for_tests_));
|
| initialized_ = true;
|
| return true;
|
| } else {
|
| @@ -101,10 +101,16 @@ bool BrokerProcess::Init(
|
| ipc_socketpair_ = socket_pair[0];
|
| is_child_ = true;
|
| CHECK(broker_process_init_callback.Run());
|
| - syscall_broker::BrokerHost broker_host(policy_, ipc_socketpair_);
|
| + BrokerHost broker_host(policy_, ipc_socketpair_);
|
| initialized_ = true;
|
| for (;;) {
|
| - broker_host.HandleRequest();
|
| + switch (broker_host.HandleRequest()) {
|
| + case BrokerHost::RequestStatus::LOST_CLIENT:
|
| + break;
|
| + case BrokerHost::RequestStatus::SUCCESS:
|
| + case BrokerHost::RequestStatus::FAILURE:
|
| + continue;
|
| + }
|
| }
|
| _exit(1);
|
| }
|
| @@ -121,4 +127,6 @@ int BrokerProcess::Open(const char* pathname, int flags) const {
|
| return broker_client_->Open(pathname, flags);
|
| }
|
|
|
| +} // namespace syscall_broker
|
| +
|
| } // namespace sandbox.
|
|
|