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

Issue 6672034: Load additional NSS library files in zygote main if remoting is enabled (Closed)

Created:
9 years, 9 months ago by Alpha Left Google
Modified:
9 years, 6 months ago
Reviewers:
wtc
CC:
chromium-reviews, jam, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Load additional NSS library files in zygote main if remoting is enabled Instead of initializing NSS before the sandbox is engaged this loads the necessary additional libraries for NSS to function properly. This allows initializing NSS after sandbox is closed and solve the security problem of loading NSS early. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78633

Patch Set 1 #

Patch Set 2 : just load libs #

Total comments: 1

Patch Set 3 : paths #

Patch Set 4 : load libs #

Total comments: 19

Patch Set 5 : comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -13 lines) Patch
M base/nss_util.h View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M base/nss_util.cc View 1 2 3 4 2 chunks +45 lines, -0 lines 2 comments Download
M content/browser/zygote_main_linux.cc View 1 2 3 4 1 chunk +6 lines, -13 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Alpha Left Google
I'm sending this for discussions. I'm not sure what is the best way to locate ...
9 years, 9 months ago (2011-03-16 02:22:26 UTC) #1
wtc
http://codereview.chromium.org/6672034/diff/2001/base/nss_util.cc File base/nss_util.cc (right): http://codereview.chromium.org/6672034/diff/2001/base/nss_util.cc#newcode410 base/nss_util.cc:410: FilePath module_path("/usr/lib/nss"); "/usr/lib/nss" is specific to Debian and its ...
9 years, 9 months ago (2011-03-16 19:00:52 UTC) #2
Alpha Left Google
I've updated the mechanism that we look for nss lib files, this is ready for ...
9 years, 9 months ago (2011-03-16 21:38:33 UTC) #3
wtc
LGTM. I suggest some important comment changes below. http://codereview.chromium.org/6672034/diff/5001/base/nss_util.cc File base/nss_util.cc (right): http://codereview.chromium.org/6672034/diff/5001/base/nss_util.cc#newcode8 base/nss_util.cc:8: #include ...
9 years, 9 months ago (2011-03-17 20:03:55 UTC) #4
Alpha Left Google
http://codereview.chromium.org/6672034/diff/5001/base/nss_util.cc File base/nss_util.cc (right): http://codereview.chromium.org/6672034/diff/5001/base/nss_util.cc#newcode8 base/nss_util.cc:8: #include <vector> On 2011/03/17 20:03:55, wtc wrote: > Nit: ...
9 years, 9 months ago (2011-03-17 22:31:34 UTC) #5
wtc
http://codereview.chromium.org/6672034/diff/5001/content/browser/zygote_main_linux.cc File content/browser/zygote_main_linux.cc (right): http://codereview.chromium.org/6672034/diff/5001/content/browser/zygote_main_linux.cc#newcode605 content/browser/zygote_main_linux.cc:605: base::LoadNSSLibraries(); On 2011/03/17 22:31:34, Alpha wrote: > > Because ...
9 years, 9 months ago (2011-03-18 18:46:31 UTC) #6
Alpha Left Google
9 years, 9 months ago (2011-03-18 18:49:12 UTC) #7
http://codereview.chromium.org/6672034/diff/5001/content/browser/zygote_main_...
File content/browser/zygote_main_linux.cc (right):

http://codereview.chromium.org/6672034/diff/5001/content/browser/zygote_main_...
content/browser/zygote_main_linux.cc:605: base::LoadNSSLibraries();
On 2011/03/18 18:46:31, wtc wrote:
> On 2011/03/17 22:31:34, Alpha wrote:
> >
> > Because we want to initalize only in the renderer process but not in the
> zygote
> > process. Also disable fork check needs to be done in the renderer process.
> 
> Did you mean the renderer process cannot load any libraries,
> even before the sandbox is activated?

When the renderer process starts (it is forked from the zygote process), it
cannot load any libraries already. So the way it works is to load the libs in
the zygote process and then fork.

Because of this, anywhere inside the renderer process we can initialize NSS
safely and doesn't need to be done here.

Powered by Google App Engine
This is Rietveld 408576698