Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: ipc/ipc_channel_posix.cc

Issue 1104002: SELinux: add basic policy. (Closed)
Patch Set: ... Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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/types.h> 10 #include <sys/types.h>
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 error = "Message requires an excessive number of descriptors"; 646 error = "Message requires an excessive number of descriptors";
647 } 647 }
648 648
649 if (error) { 649 if (error) {
650 LOG(WARNING) << error 650 LOG(WARNING) << error
651 << " channel:" << this 651 << " channel:" << this
652 << " message-type:" << m.type() 652 << " message-type:" << m.type()
653 << " header()->num_fds:" << m.header()->num_fds 653 << " header()->num_fds:" << m.header()->num_fds
654 << " num_fds:" << num_fds 654 << " num_fds:" << num_fds
655 << " fds_i:" << fds_i; 655 << " fds_i:" << fds_i;
656 #if defined(CHROMIUM_SELINUX)
Evan Martin 2010/03/18 17:12:22 Does this file have access to this #define? It is
657 LOG(WARNING) << "In the case of SELinux this can be caused when "
658 "using a --user-data-dir to which the default "
659 "policy doesn't give the renderer access to. ";
660 #endif
656 // close the existing file descriptors so that we don't leak them 661 // close the existing file descriptors so that we don't leak them
657 for (unsigned i = fds_i; i < num_fds; ++i) 662 for (unsigned i = fds_i; i < num_fds; ++i)
658 HANDLE_EINTR(close(fds[i])); 663 HANDLE_EINTR(close(fds[i]));
659 input_overflow_fds_.clear(); 664 input_overflow_fds_.clear();
660 // abort the connection 665 // abort the connection
661 return false; 666 return false;
662 } 667 }
663 668
664 m.file_descriptor_set()->SetDescriptors( 669 m.file_descriptor_set()->SetDescriptors(
665 &fds[fds_i], m.header()->num_fds); 670 &fds[fds_i], m.header()->num_fds);
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 1054
1050 bool Channel::Send(Message* message) { 1055 bool Channel::Send(Message* message) {
1051 return channel_impl_->Send(message); 1056 return channel_impl_->Send(message);
1052 } 1057 }
1053 1058
1054 int Channel::GetClientFileDescriptor() const { 1059 int Channel::GetClientFileDescriptor() const {
1055 return channel_impl_->GetClientFileDescriptor(); 1060 return channel_impl_->GetClientFileDescriptor();
1056 } 1061 }
1057 1062
1058 } // namespace IPC 1063 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698