Bug 1719279 - Properly add $HOME/.cache/fontconfig allowance r=gcp

Differential Revision: https://phabricator.services.mozilla.com/D119178
This commit is contained in:
Alexandre Lissy 2021-07-20 12:24:56 +00:00
parent 4a3911b1a1
commit f7a9b9a730
2 changed files with 13 additions and 1 deletions

View File

@ -406,7 +406,7 @@ void SandboxBrokerPolicyFactory::InitContentPolicy() {
for (const auto& dir : extraConfDirs) {
rv = homeDir->Clone(getter_AddRefs(confDir));
if (NS_SUCCEEDED(rv)) {
rv = confDir->AppendNative(nsDependentCString(dir));
rv = confDir->AppendRelativeNativePath(nsDependentCString(dir));
if (NS_SUCCEEDED(rv)) {
nsAutoCString tmpPath;
rv = confDir->GetNativePath(tmpPath);

View File

@ -468,6 +468,18 @@ async function testFileAccess() {
func: readDir,
cleanup: unpopulateFakeXdgConfigHome,
});
let homeDir = GetHomeDir();
let cacheFontConfigDir = homeDir.clone();
cacheFontConfigDir.appendRelativePath(".cache/fontconfig");
tests.push({
desc: "$HOME/.cache/fontconfig/",
ok: true,
browser: webBrowser,
file: cacheFontConfigDir,
minLevel: minHomeReadSandboxLevel(),
func: readDir,
});
}
if (isMac()) {