diff options
| author | Mike McQuaid | 2016-12-20 09:57:37 +0000 |
|---|---|---|
| committer | GitHub | 2016-12-20 09:57:37 +0000 |
| commit | e3844719bc01c734a054389e908c44e1fa6313e3 (patch) | |
| tree | 8cf53cc1f134990789d92ac8bcda4259d936aa78 /Library | |
| parent | 26af62ed686449022e6dc782bd3224af6c5aaafd (diff) | |
| parent | 2b547583a3d147ad06ae26bbc1bcbaf8ce0ce9fb (diff) | |
| download | brew-e3844719bc01c734a054389e908c44e1fa6313e3.tar.bz2 | |
Merge pull request #1680 from MikeMcQuaid/post-install-sandbox-prefix
postinstall: don't allow writes to prefix itself.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/postinstall.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/postinstall.rb b/Library/Homebrew/cmd/postinstall.rb index e8855b09e..8808a2602 100644 --- a/Library/Homebrew/cmd/postinstall.rb +++ b/Library/Homebrew/cmd/postinstall.rb @@ -37,8 +37,10 @@ module Homebrew sandbox.allow_write_log(formula) sandbox.allow_write_xcode sandbox.deny_write_homebrew_repository - sandbox.allow_write_path HOMEBREW_PREFIX sandbox.allow_write_cellar(formula) + Keg::TOP_LEVEL_DIRECTORIES.each do |dir| + sandbox.allow_write_path "#{HOMEBREW_PREFIX}/#{dir}" + end sandbox.exec(*args) else exec(*args) |
