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

Side by Side Diff: content/browser/zygote_host/zygote_host_impl_linux.cc

Issue 915433002: Default to enabling the namespace sandbox when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comment Created 5 years, 10 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 | « no previous file | content/public/common/content_switches.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 "content/browser/zygote_host/zygote_host_impl_linux.h" 5 #include "content/browser/zygote_host/zygote_host_impl_linux.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/socket.h> 8 #include <sys/socket.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 return 0; 578 return 0;
579 } 579 }
580 580
581 bool ZygoteHostImpl::ShouldUseNamespaceSandbox() { 581 bool ZygoteHostImpl::ShouldUseNamespaceSandbox() {
582 const base::CommandLine& command_line = 582 const base::CommandLine& command_line =
583 *base::CommandLine::ForCurrentProcess(); 583 *base::CommandLine::ForCurrentProcess();
584 if (command_line.HasSwitch(switches::kNoSandbox)) { 584 if (command_line.HasSwitch(switches::kNoSandbox)) {
585 return false; 585 return false;
586 } 586 }
587 587
588 if (!command_line.HasSwitch(switches::kEnableNamespaceSandbox)) { 588 if (command_line.HasSwitch(switches::kDisableNamespaceSandbox)) {
589 return false; 589 return false;
590 } 590 }
591 591
592 if (!sandbox::Credentials::CanCreateProcessInNewUserNS()) { 592 if (!sandbox::Credentials::CanCreateProcessInNewUserNS()) {
593 return false; 593 return false;
594 } 594 }
595 595
596 return true; 596 return true;
597 } 597 }
598 598
599 } // namespace content 599 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698