diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-08 21:57:46 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-08 21:57:46 +0000 |
commit | 9f9b4f25e39c7b090a3dd13a26dbc6461cfb3b2e (patch) | |
tree | 1d4db00a4eff6a270e42692c067f84b376bc659b /base | |
parent | 4a945818f5b395dfdcf9d60cefe4f9f9b242d9c5 (diff) | |
download | chromium_src-9f9b4f25e39c7b090a3dd13a26dbc6461cfb3b2e.zip chromium_src-9f9b4f25e39c7b090a3dd13a26dbc6461cfb3b2e.tar.gz chromium_src-9f9b4f25e39c7b090a3dd13a26dbc6461cfb3b2e.tar.bz2 |
Remove excessive path checking so we can fallback on native library search path on linux.
LoadNativeLibrary falls back to dlopen() on linux, which will default to
searching the system library directories (/lib, /usr/lib, and those specified
in /etc/ld.so.conf) if it is given a filename w/o an absolute path.
This explicit file existance check effectively disables the search behavior.
Removing it should be okay since dlopen is designed to handle invalid paths.
BUG=None
TEST=A/B tested with only having the libraries and /usr/lib, and seeing if the "Failed to load NSS libraries" shows with and w/o the fix.
Review URL: http://codereview.chromium.org/6824013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80997 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/nss_util.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/base/nss_util.cc b/base/nss_util.cc index 3293208..ad30ea1 100644 --- a/base/nss_util.cc +++ b/base/nss_util.cc @@ -592,9 +592,6 @@ void LoadNSSLibraries() { // For Debian derivaties NSS libraries are located here. paths.push_back(FilePath("/usr/lib/nss")); - // For other distros use this path. - paths.push_back(FilePath("/usr/lib")); - // A list of library files to load. std::vector<std::string> libs; libs.push_back("libsoftokn3.so"); @@ -606,12 +603,10 @@ void LoadNSSLibraries() { for (size_t i = 0; i < libs.size(); ++i) { for (size_t j = 0; j < paths.size(); ++j) { FilePath path = paths[j].Append(libs[i]); - if (file_util::PathExists(path)) { - NativeLibrary lib = base::LoadNativeLibrary(path); - if (lib) { - ++loaded; - break; - } + NativeLibrary lib = base::LoadNativeLibrary(path); + if (lib) { + ++loaded; + break; } } } |