Chromium Code Reviews| Index: content/browser/zygote_main_linux.cc |
| diff --git a/content/browser/zygote_main_linux.cc b/content/browser/zygote_main_linux.cc |
| index 47932817e82a7ec24dcfde47d0e168bc3fb5c11b..e041a7a40e0d0c93a3f80922272120753743ced9 100644 |
| --- a/content/browser/zygote_main_linux.cc |
| +++ b/content/browser/zygote_main_linux.cc |
| @@ -21,6 +21,7 @@ |
| #include "content/browser/zygote_host_linux.h" |
| +#include "base/base64.h" |
| #include "base/basictypes.h" |
| #include "base/command_line.h" |
| #include "base/eintr_wrapper.h" |
| @@ -28,6 +29,7 @@ |
| #include "base/global_descriptors_posix.h" |
| #include "base/hash_tables.h" |
| #include "base/linux_util.h" |
| +#include "base/nss_util.h" |
| #include "base/path_service.h" |
| #include "base/pickle.h" |
| #include "base/process_util.h" |
| @@ -600,6 +602,20 @@ static void PreSandboxInit() { |
| if (PathService::Get(base::DIR_MODULE, &module_path)) |
| media::InitializeMediaLibrary(module_path); |
| + // Remoting requires NSS to function properly. It is not used for other |
| + // reasons so load NSS only if remoting is enabled. |
| + const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| + if (command_line.HasSwitch(switches::kEnableRemoting)) { |
| + // We are going to fork to engage the sandbox and we have not loaded |
| + // any security modules so it is safe to disable the fork check in NSS. |
| + base::DisableNSSForkCheck(); |
| + |
| + // Initialize NSPR and NSS so that we load the necessary library files |
| + // before we enter the sandbox. |
| + base::EnsureNSPRInit(); |
|
wtc
2011/03/15 00:21:45
Remove this EnsureNSPRInit call.
|
| + base::EnsureNSSNoDBInit(); |
| + } |
| + |
| // Ensure access to the Pepper plugins before the sandbox is turned on. |
| PepperPluginRegistry::PreloadModules(); |
| } |