Bug 1385891 - Whitelist things in the extension dir, not just the dir itself. r?jld draft
authorGian-Carlo Pascutto <gcp@mozilla.com>
Fri, 04 Aug 2017 09:48:32 +0200
changeset 621050 baa17deb7a522f45d3ef411b423efbc3eda7e2ae
parent 621000 901c59d3ab9ff1d54ea365be473bdd254629fbf3
child 640878 39c3cf9c630a1066666d1a06d4cbe354dd68f652
push id72234
push usergpascutto@mozilla.com
push dateFri, 04 Aug 2017 07:49:17 +0000
reviewersjld
bugs1385891
milestone57.0a1
Bug 1385891 - Whitelist things in the extension dir, not just the dir itself. r?jld MozReview-Commit-ID: 3DryT8mm1F3
security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
--- a/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
+++ b/security/sandbox/linux/broker/SandboxBrokerPolicyFactory.cpp
@@ -277,17 +277,17 @@ SandboxBrokerPolicyFactory::GetContentPo
       }
       rv = profileDir->Clone(getter_AddRefs(workDir));
       if (NS_SUCCEEDED(rv)) {
         rv = workDir->AppendNative(NS_LITERAL_CSTRING("extensions"));
         if (NS_SUCCEEDED(rv)) {
           nsAutoCString tmpPath;
           rv = workDir->GetNativePath(tmpPath);
           if (NS_SUCCEEDED(rv)) {
-            policy->AddPath(rdonly, tmpPath.get());
+            policy->AddDir(rdonly, tmpPath.get());
           }
         }
       }
   }
 
   // Return the common policy.
   return policy;