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 <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <poll.h> | 9 #include <poll.h> |
| 10 #include <stddef.h> |
10 #include <sys/resource.h> | 11 #include <sys/resource.h> |
11 #include <sys/stat.h> | 12 #include <sys/stat.h> |
12 #include <sys/types.h> | 13 #include <sys/types.h> |
13 #include <sys/wait.h> | 14 #include <sys/wait.h> |
14 #include <unistd.h> | 15 #include <unistd.h> |
15 | 16 |
16 #include <algorithm> | 17 #include <algorithm> |
17 #include <string> | 18 #include <string> |
18 #include <vector> | 19 #include <vector> |
19 | 20 |
20 #include "base/bind.h" | 21 #include "base/bind.h" |
21 #include "base/files/file_util.h" | 22 #include "base/files/file_util.h" |
22 #include "base/files/scoped_file.h" | 23 #include "base/files/scoped_file.h" |
23 #include "base/logging.h" | 24 #include "base/logging.h" |
| 25 #include "base/macros.h" |
24 #include "base/memory/scoped_ptr.h" | 26 #include "base/memory/scoped_ptr.h" |
25 #include "base/posix/eintr_wrapper.h" | 27 #include "base/posix/eintr_wrapper.h" |
26 #include "base/posix/unix_domain_socket_linux.h" | 28 #include "base/posix/unix_domain_socket_linux.h" |
27 #include "sandbox/linux/syscall_broker/broker_client.h" | 29 #include "sandbox/linux/syscall_broker/broker_client.h" |
28 #include "sandbox/linux/tests/scoped_temporary_file.h" | 30 #include "sandbox/linux/tests/scoped_temporary_file.h" |
29 #include "sandbox/linux/tests/test_utils.h" | 31 #include "sandbox/linux/tests/test_utils.h" |
30 #include "sandbox/linux/tests/unit_tests.h" | 32 #include "sandbox/linux/tests/unit_tests.h" |
31 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
32 | 34 |
33 namespace sandbox { | 35 namespace sandbox { |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 ssize_t len = HANDLE_EINTR(read(fd_check, buf, sizeof(buf))); | 649 ssize_t len = HANDLE_EINTR(read(fd_check, buf, sizeof(buf))); |
648 | 650 |
649 ASSERT_EQ(len, static_cast<ssize_t>(sizeof(kTestText))); | 651 ASSERT_EQ(len, static_cast<ssize_t>(sizeof(kTestText))); |
650 ASSERT_EQ(memcmp(kTestText, buf, sizeof(kTestText)), 0); | 652 ASSERT_EQ(memcmp(kTestText, buf, sizeof(kTestText)), 0); |
651 } | 653 } |
652 } | 654 } |
653 | 655 |
654 } // namespace syscall_broker | 656 } // namespace syscall_broker |
655 | 657 |
656 } // namespace sandbox | 658 } // namespace sandbox |
OLD | NEW |