Merge pull request #1680 from MikeMcQuaid/post-install-sandbox-prefix
postinstall: don't allow writes to prefix itself.
This commit is contained in:
commit
e3844719bc
@ -37,8 +37,10 @@ module Homebrew
|
|||||||
sandbox.allow_write_log(formula)
|
sandbox.allow_write_log(formula)
|
||||||
sandbox.allow_write_xcode
|
sandbox.allow_write_xcode
|
||||||
sandbox.deny_write_homebrew_repository
|
sandbox.deny_write_homebrew_repository
|
||||||
sandbox.allow_write_path HOMEBREW_PREFIX
|
|
||||||
sandbox.allow_write_cellar(formula)
|
sandbox.allow_write_cellar(formula)
|
||||||
|
Keg::TOP_LEVEL_DIRECTORIES.each do |dir|
|
||||||
|
sandbox.allow_write_path "#{HOMEBREW_PREFIX}/#{dir}"
|
||||||
|
end
|
||||||
sandbox.exec(*args)
|
sandbox.exec(*args)
|
||||||
else
|
else
|
||||||
exec(*args)
|
exec(*args)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user