Bug 1337304. r=snorp

--HG--
extra : rebase_source : 7306160ece787ed98fb98ec1bcecbb0466d98093
This commit is contained in:
Jim Chen 2017-02-08 13:49:20 -05:00
parent 5b5e83bd5c
commit 21dfb2d432
2 changed files with 4 additions and 7 deletions

View File

@ -216,13 +216,6 @@ public final class GeckoLoader {
}
putenv("MOZ_LINKER_EXTRACT=1");
// Ensure that the cache dir is world-writable
File cacheDir = new File(linkerCache);
if (cacheDir.isDirectory()) {
cacheDir.setWritable(true, false);
cacheDir.setExecutable(true, false);
cacheDir.setReadable(true, false);
}
}
@RobocopTarget

View File

@ -149,6 +149,10 @@ MappableExtractFile::Create(const char *name, Zip *zip, Zip::Stream *stream)
"not extracting");
return nullptr;
}
// Ensure that the cache dir is private.
chmod(cachePath, 0770);
UniquePtr<char[]> path =
MakeUnique<char[]>(strlen(cachePath) + strlen(name) + 2);
sprintf(path.get(), "%s/%s", cachePath, name);