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 "ipc/ipc_channel_posix.h" | 5 #include "ipc/ipc_channel_posix.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <sys/socket.h> | 10 #include <sys/socket.h> |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 } | 834 } |
835 | 835 |
836 if (header_fds > FileDescriptorSet::kMaxDescriptorsPerMessage) | 836 if (header_fds > FileDescriptorSet::kMaxDescriptorsPerMessage) |
837 error = "Message requires an excessive number of descriptors"; | 837 error = "Message requires an excessive number of descriptors"; |
838 | 838 |
839 if (error) { | 839 if (error) { |
840 LOG(WARNING) << error | 840 LOG(WARNING) << error |
841 << " channel:" << this | 841 << " channel:" << this |
842 << " message-type:" << msg->type() | 842 << " message-type:" << msg->type() |
843 << " header()->num_fds:" << header_fds; | 843 << " header()->num_fds:" << header_fds; |
844 #if defined(CHROMIUM_SELINUX) | |
845 LOG(WARNING) << "In the case of SELinux this can be caused when " | |
846 "using a --user-data-dir to which the default " | |
847 "policy doesn't give the renderer access to. "; | |
848 #endif // CHROMIUM_SELINUX | |
849 // Abort the connection. | 844 // Abort the connection. |
850 ClearInputFDs(); | 845 ClearInputFDs(); |
851 return false; | 846 return false; |
852 } | 847 } |
853 | 848 |
854 // The shenaniganery below with &foo.front() requires input_fds_ to have | 849 // The shenaniganery below with &foo.front() requires input_fds_ to have |
855 // contiguous underlying storage (such as a simple array or a std::vector). | 850 // contiguous underlying storage (such as a simple array or a std::vector). |
856 // This is why the header warns not to make input_fds_ a deque<>. | 851 // This is why the header warns not to make input_fds_ a deque<>. |
857 msg->file_descriptor_set()->SetDescriptors(&input_fds_.front(), | 852 msg->file_descriptor_set()->SetDescriptors(&input_fds_.front(), |
858 header_fds); | 853 header_fds); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 | 1019 |
1025 | 1020 |
1026 #if defined(OS_LINUX) | 1021 #if defined(OS_LINUX) |
1027 // static | 1022 // static |
1028 void Channel::SetGlobalPid(int pid) { | 1023 void Channel::SetGlobalPid(int pid) { |
1029 ChannelImpl::SetGlobalPid(pid); | 1024 ChannelImpl::SetGlobalPid(pid); |
1030 } | 1025 } |
1031 #endif // OS_LINUX | 1026 #endif // OS_LINUX |
1032 | 1027 |
1033 } // namespace IPC | 1028 } // namespace IPC |
OLD | NEW |