Skip to content

Commit

Permalink
Improve SUID find
Browse files Browse the repository at this point in the history
  • Loading branch information
magmax committed Feb 12, 2022
1 parent 99a7016 commit b9f6977
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/suid_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def initialize(blacklist = nil)
end

def permissions
output = inspec.command('find / -perm -4000 -o -perm -2000 -type f ! -path \'/proc/*\' ! -path \'/var/lib/lxd/containers/*\' -print 2>/dev/null | grep -v \'^find:\'')
output = inspec.command('find / -type d \( -path \'/proc/*\' -o -path \'/var/lib/lxd/containers/*\' \) -prune -type f -o -perm -2000 -o -perm 4000 2>/dev/null | grep -v \'^find:\'')
output.stdout.split(/\r?\n/)
end

Expand Down

0 comments on commit b9f6977

Please sign in to comment.