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

Unified Diff: remoting/host/win/worker_process_launcher.cc

Issue 10824316: Avoid calling GetNamedPipeClientProcessId() which is not available on XP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/win/worker_process_launcher.h ('k') | remoting/host/win/wts_session_process_launcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/win/worker_process_launcher.cc
diff --git a/remoting/host/win/worker_process_launcher.cc b/remoting/host/win/worker_process_launcher.cc
index cf781b215d25a1502498f108782be610a9cbf70f..578cfec713ec13b527a05327a28b3203fea2f4aa 100644
--- a/remoting/host/win/worker_process_launcher.cc
+++ b/remoting/host/win/worker_process_launcher.cc
@@ -109,16 +109,15 @@ void WorkerProcessLauncher::OnChannelConnected(int32 peer_pid) {
DCHECK(pipe_.IsValid());
DCHECK(process_exit_event_.IsValid());
- // Get the actual peer's PID (i.e. reported by the OS) instead of the PID
- // reported by the peer itself (|peer_pid|).
- DWORD actual_peer_pid;
- if (!GetNamedPipeClientProcessId(pipe_, &actual_peer_pid)) {
- LOG_GETLASTERROR(ERROR) << "Failed to query the peer's PID";
- Stop();
- return;
- }
-
- delegate_->OnChannelConnected(actual_peer_pid);
+ // |peer_pid| is send by the client and cannot be trusted.
+ // GetNamedPipeClientProcessId() is not available on XP. The pipe's security
+ // descriptor is the only protection we currently have against malicious
+ // clients.
+ //
+ // If we'd like to be able to launch low-privileged workers and let them to
dcaiafa 2012/08/15 20:44:32 nit: "...let them connect..."
alexeypa (please no reviews) 2012/08/15 21:15:07 Done.
+ // connect back, the pipe handle should be passed to the worker instead of
+ // the pipe name.
+ delegate_->OnChannelConnected();
}
void WorkerProcessLauncher::OnChannelError() {
« no previous file with comments | « remoting/host/win/worker_process_launcher.h ('k') | remoting/host/win/wts_session_process_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698