diff options
| author | Mike McQuaid | 2015-02-19 09:29:17 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-02-19 09:29:17 +0000 |
| commit | 6dd51ff399df505921336faba3170611991b1d96 (patch) | |
| tree | 4c2ff5f79660f2d12727638a45b5379ace258b55 /Library | |
| parent | e92a87179a2f90d8a43731b67adcd0b0b104a0eb (diff) | |
| download | brew-6dd51ff399df505921336faba3170611991b1d96.tar.bz2 | |
audit: check for setuid in caveats.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index b13a2ad9d..3d5f6c440 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -700,6 +700,14 @@ class FormulaAuditor end end + def audit_caveats + caveats = formula.caveats + + if caveats =~ /setuid/ + problem "Don't recommend setuid in the caveats, suggest sudo instead." + end + end + def audit_prefix_has_contents return unless formula.prefix.directory? @@ -748,6 +756,7 @@ class FormulaAuditor audit_options audit_patches audit_text + audit_caveats text.without_patch.split("\n").each_with_index { |line, lineno| audit_line(line, lineno+1) } audit_installed audit_prefix_has_contents |
