Bug 1386404 - Enable access to the entire chrome dir from content. r?jld draft
authorGian-Carlo Pascutto <gcp@mozilla.com>
Thu, 26 Oct 2017 18:57:03 +0200
changeset 749378 863c67d57e88142ae5202e729e3c0c41e179515b
parent 749377 bab15003be929dbd5a2bac5ee04e8db38dbf7795
child 749379 33efd3bf5e4bfa849fcec9d158c0844387a45dc8
push id97374
push usergpascutto@mozilla.com
push dateWed, 31 Jan 2018 09:19:12 +0000
reviewersjld
bugs1386404
milestone60.0a1
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
@@ -464,23 +464,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;