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
--- 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;