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

Side by Side Diff: content/zygote/zygote_main_linux.cc

Issue 11819022: NaCl: Remove unused "sandboxed_" field and argument from NaClForkDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « content/public/common/zygote_fork_delegate_linux.h ('k') | no next file » | 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 <dlfcn.h> 5 #include <dlfcn.h>
6 #include <fcntl.h> 6 #include <fcntl.h>
7 #include <pthread.h> 7 #include <pthread.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 // There need to be a corresponding call to PreinitializeSandboxFinish() 456 // There need to be a corresponding call to PreinitializeSandboxFinish()
457 // for each new process, this will be done in the Zygote child, once we know 457 // for each new process, this will be done in the Zygote child, once we know
458 // our process type. 458 // our process type.
459 linux_sandbox->PreinitializeSandboxBegin(); 459 linux_sandbox->PreinitializeSandboxBegin();
460 460
461 sandbox::SetuidSandboxClient* setuid_sandbox = 461 sandbox::SetuidSandboxClient* setuid_sandbox =
462 linux_sandbox->setuid_sandbox_client(); 462 linux_sandbox->setuid_sandbox_client();
463 463
464 if (forkdelegate != NULL) { 464 if (forkdelegate != NULL) {
465 VLOG(1) << "ZygoteMain: initializing fork delegate"; 465 VLOG(1) << "ZygoteMain: initializing fork delegate";
466 forkdelegate->Init(setuid_sandbox->IsSuidSandboxChild(), 466 forkdelegate->Init(Zygote::kBrowserDescriptor,
467 Zygote::kBrowserDescriptor,
468 Zygote::kMagicSandboxIPCDescriptor); 467 Zygote::kMagicSandboxIPCDescriptor);
469 } else { 468 } else {
470 VLOG(1) << "ZygoteMain: fork delegate is NULL"; 469 VLOG(1) << "ZygoteMain: fork delegate is NULL";
471 } 470 }
472 471
473 // Turn on the SELinux or SUID sandbox. 472 // Turn on the SELinux or SUID sandbox.
474 bool using_suid_sandbox = false; 473 bool using_suid_sandbox = false;
475 bool has_started_new_init = false; 474 bool has_started_new_init = false;
476 475
477 if (!EnterSandbox(setuid_sandbox, 476 if (!EnterSandbox(setuid_sandbox,
(...skipping 11 matching lines...) Expand all
489 } 488 }
490 489
491 int sandbox_flags = linux_sandbox->GetStatus(); 490 int sandbox_flags = linux_sandbox->GetStatus();
492 491
493 Zygote zygote(sandbox_flags, forkdelegate); 492 Zygote zygote(sandbox_flags, forkdelegate);
494 // This function call can return multiple times, once per fork(). 493 // This function call can return multiple times, once per fork().
495 return zygote.ProcessRequests(); 494 return zygote.ProcessRequests();
496 } 495 }
497 496
498 } // namespace content 497 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/zygote_fork_delegate_linux.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698