diff options
| author | Mike McQuaid | 2015-02-19 09:29:17 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-02-19 09:29:17 +0000 |
| commit | c86df1583cf9001a8d82ce208c7416cf5680ce2a (patch) | |
| tree | fdf18b72dd7754c3170cef86099089d58db9d99c /Library/Homebrew | |
| parent | 7f6d05e12dc10e63e30afdc871173d488a96d182 (diff) | |
| download | homebrew-c86df1583cf9001a8d82ce208c7416cf5680ce2a.tar.bz2 | |
audit: check for setuid in caveats.
Diffstat (limited to 'Library/Homebrew')
| -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 |
