mirror of
https://github.com/inspec/inspec
synced 2025-02-20 16:08:41 +00:00
Wildcards are evaluated prior to applying `sudo` permissions. This means that running `sudo find /some/path/*.conf` will fail if the user does not have read permissions on `/some/path/` because the wildcard cannot expand before `sudo` is applied and `*.conf` isn't a file. The solution for this is to run the command in a subshell that has the proper permissions (e.g. `sudo sh -c 'find /some/path/*.conf'`). This modifies `Utils::FindFiles` to use a subshell thus allowing wildcard support. This fixes #2157 Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com> |
||
---|---|---|
.. | ||
command_wrapper.rb | ||
convert.rb | ||
database_helpers.rb | ||
erlang_parser.rb | ||
filter.rb | ||
filter_array.rb | ||
find_files.rb | ||
hash.rb | ||
json_log.rb | ||
latest_version.rb | ||
modulator.rb | ||
nginx_parser.rb | ||
object_traversal.rb | ||
parser.rb | ||
plugin_registry.rb | ||
simpleconfig.rb | ||
spdx.rb | ||
spdx.txt |