Bug 1230857 - Make GMPInstallManager enforce sensible permissions on GMP files at install time. r=spohl

This ensures that GMP packages with bad permissions will still be usable. For
example, a GMP without execute/read permissions in its zip won't work without
this.

--HG--
extra : rebase_source : a134fed8ef23090eafd7587df1bea73f328a21e2
This commit is contained in:
Chris Pearce 2016-01-14 15:16:06 +13:00
parent 30838a05fa
commit f38352231d

View File

@ -421,6 +421,9 @@ GMPExtractor.prototype = {
}
zipReader.extract(entry, outFile);
extractedPaths.push(outFile.path);
// Ensure files are writable and executable. Otherwise we may be unable to
// execute or uninstall them.
outFile.permissions |= parseInt("0700", 8);
log.info(entry + " was successfully extracted to: " +
outFile.path);
});