2
0
Fork 0
mirror of https://github.com/inspec/inspec synced 2025-02-24 11:27:25 +00:00
inspec/test/cookbooks/os_prepare
Jerry Aldrich III 3d7244fb07 Add wildcard support to Utils::FindFiles ()
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 

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2017-09-23 09:17:34 +02:00
..
attributes run integration tests in docker 2016-05-16 18:25:17 +02:00
files Add support for XML files () 2017-08-31 09:56:14 +02:00
recipes Add wildcard support to Utils::FindFiles () 2017-09-23 09:17:34 +02:00
templates/default move kitchen integration tests to top-level 2016-03-18 11:30:54 +01:00
metadata.rb Docker resource () 2017-04-24 10:47:03 -04:00