diff options
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/linux/syscall_broker/broker_client.cc | 2 | ||||
-rw-r--r-- | sandbox/linux/syscall_broker/broker_host.cc | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/sandbox/linux/syscall_broker/broker_client.cc b/sandbox/linux/syscall_broker/broker_client.cc index b82ecb3..8d04197 100644 --- a/sandbox/linux/syscall_broker/broker_client.cc +++ b/sandbox/linux/syscall_broker/broker_client.cc @@ -92,7 +92,7 @@ int BrokerClient::PathAndFlagsSyscall(IPCCommand syscall_type, int return_value = -1; // Now deserialize the return value and eventually return the file // descriptor. - if (read_pickle.ReadInt(&iter, &return_value)) { + if (iter.ReadInt(&return_value)) { switch (syscall_type) { case COMMAND_ACCESS: // We should never have a fd to return. diff --git a/sandbox/linux/syscall_broker/broker_host.cc b/sandbox/linux/syscall_broker/broker_host.cc index 7ebc785..ca55f21 100644 --- a/sandbox/linux/syscall_broker/broker_host.cc +++ b/sandbox/linux/syscall_broker/broker_host.cc @@ -110,21 +110,18 @@ void AccessFileForIPC(const BrokerPolicy& policy, } } -// Handle a |command_type| request contained in |read_pickle| and send the reply +// Handle a |command_type| request contained in |iter| and send the reply // on |reply_ipc|. // Currently COMMAND_OPEN and COMMAND_ACCESS are supported. bool HandleRemoteCommand(const BrokerPolicy& policy, IPCCommand command_type, int reply_ipc, - const Pickle& read_pickle, PickleIterator iter) { // Currently all commands have two arguments: filename and flags. std::string requested_filename; int flags = 0; - if (!read_pickle.ReadString(&iter, &requested_filename) || - !read_pickle.ReadInt(&iter, &flags)) { + if (!iter.ReadString(&requested_filename) || !iter.ReadInt(&flags)) return false; - } Pickle write_pickle; std::vector<int> opened_files; @@ -200,7 +197,7 @@ BrokerHost::RequestStatus BrokerHost::HandleRequest() const { Pickle pickle(buf, msg_len); PickleIterator iter(pickle); int command_type; - if (pickle.ReadInt(&iter, &command_type)) { + if (iter.ReadInt(&command_type)) { bool command_handled = false; // Go through all the possible IPC messages. switch (command_type) { @@ -209,7 +206,7 @@ BrokerHost::RequestStatus BrokerHost::HandleRequest() const { // We reply on the file descriptor sent to us via the IPC channel. command_handled = HandleRemoteCommand( broker_policy_, static_cast<IPCCommand>(command_type), - temporary_ipc.get(), pickle, iter); + temporary_ipc.get(), iter); break; default: NOTREACHED(); |