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

Side by Side Diff: ipc/ipc_channel_nacl.cc

Issue 1262543003: ipc: Create an unforgeable mechanism to get the process id of the sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove dchecks. Created 5 years, 4 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
« no previous file with comments | « ipc/ipc_channel_nacl.h ('k') | ipc/ipc_channel_posix.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_nacl.h" 5 #include "ipc/ipc_channel_nacl.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 10
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 // When the input data buffer is empty, the fds should be too. 372 // When the input data buffer is empty, the fds should be too.
373 return input_fds_.empty(); 373 return input_fds_.empty();
374 } 374 }
375 375
376 void ChannelNacl::HandleInternalMessage(const Message& msg) { 376 void ChannelNacl::HandleInternalMessage(const Message& msg) {
377 // The trusted side IPC::Channel should handle the "hello" handshake; we 377 // The trusted side IPC::Channel should handle the "hello" handshake; we
378 // should not receive the "Hello" message. 378 // should not receive the "Hello" message.
379 NOTREACHED(); 379 NOTREACHED();
380 } 380 }
381 381
382 base::ProcessId ChannelNacl::GetSenderPID() {
383 // The untrusted side of the IPC::Channel should never have to worry about
384 // sender's process id.
385 return base::kNullProcessId;
386 }
387
382 // Channel's methods 388 // Channel's methods
383 389
384 // static 390 // static
385 scoped_ptr<Channel> Channel::Create(const IPC::ChannelHandle& channel_handle, 391 scoped_ptr<Channel> Channel::Create(const IPC::ChannelHandle& channel_handle,
386 Mode mode, 392 Mode mode,
387 Listener* listener, 393 Listener* listener,
388 AttachmentBroker* broker) { 394 AttachmentBroker* broker) {
389 return scoped_ptr<Channel>( 395 return scoped_ptr<Channel>(
390 new ChannelNacl(channel_handle, mode, listener, broker)); 396 new ChannelNacl(channel_handle, mode, listener, broker));
391 } 397 }
392 398
393 } // namespace IPC 399 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_nacl.h ('k') | ipc/ipc_channel_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698