OLD | NEW |
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 Loading... |
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 |
OLD | NEW |