Bug 1386404 - Enable access to the entire chrome dir from content. r=jld
☠☠ backed out by 27a4ccb808ea ☠ ☠
authorGian-Carlo Pascutto <gcp@mozilla.com>
Thu, 26 Oct 2017 18:57:03 +0200
changeset 389065 4600c2d575f9fdd3168942edde1bc01d2874c460
parent 389064 c2c40e4d9815fb3ab65543071a2d891dcd142bc9
child 389066 b136f90dc49f8c34b44246d8e3e4916bc5c5c24a
push id32777
push userarchaeopteryx@coole-files.de
push dateMon, 30 Oct 2017 22:44:45 +0000
treeherdermozilla-central@dd0f265a1300 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjld
bugs1386404
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1386404 - Enable access to the entire chrome dir from content. r=jld This may be required if people have @import in their userContent.css, and in any case our tests check for this. MozReview-Commit-ID: 8uJcWiC2rli
security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
--- a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
+++ b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
@@ -446,23 +446,20 @@ SandboxBrokerPolicyFactory::GetContentPo
   rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
                               getter_AddRefs(profileDir));
   if (NS_SUCCEEDED(rv)) {
       nsCOMPtr<nsIFile> workDir;
       rv = profileDir->Clone(getter_AddRefs(workDir));
       if (NS_SUCCEEDED(rv)) {
         rv = workDir->AppendNative(NS_LITERAL_CSTRING("chrome"));
         if (NS_SUCCEEDED(rv)) {
-          rv = workDir->AppendNative(NS_LITERAL_CSTRING("userContent.css"));
+          nsAutoCString tmpPath;
+          rv = workDir->GetNativePath(tmpPath);
           if (NS_SUCCEEDED(rv)) {
-            nsAutoCString tmpPath;
-            rv = workDir->GetNativePath(tmpPath);
-            if (NS_SUCCEEDED(rv)) {
-              policy->AddPath(rdonly, tmpPath.get());
-            }
+            policy->AddDir(rdonly, tmpPath.get());
           }
         }
       }
       rv = profileDir->Clone(getter_AddRefs(workDir));
       if (NS_SUCCEEDED(rv)) {
         rv = workDir->AppendNative(NS_LITERAL_CSTRING("extensions"));
         if (NS_SUCCEEDED(rv)) {
           nsAutoCString tmpPath;