mirror of
https://github.com/inspec/inspec
synced 2024-11-15 17:28:02 +00:00
221db7e132
* mount resource: fix for Device-/Sharenames and Mountpoints including whitespaces Device-/Sharenames and Mountpoints on Linux may include whitespaces (\040), e.g. /etc/fstab entry like: ```//fileserver.corp.internal/Research\040&\040Development /mnt/Research\040&\040Development cifs OTHER_OPTS``` ... results in a mount line like: ```//fileserver.corp.internal/Research & Development on /mnt/Research & Development type cifs (OTHER_OPTS)``` The Linux mount command replaces \040 with whitspace automatically, so this should be tributed. I used a control like this: ``` describe mount('/mnt/Research & Development') do it { should be_mounted } its('device') { should eq '//fileserver.corp.internal/Research & Development' } end ``` Before: ``` × whitespaces-1: Mount with whitespace within sharename and mountpoint. (1 failed) ✔ Mount /mnt/Research & Development should be mounted × Mount /mnt/Research & Development device should eq "//fileserver.corp.internal/Research & Development" expected: "//fileserver.corp.internal/Research & Development" got: "//fileserver.corp.internal/Research" (compared using ==) ``` After: ``` ✔ whitespaces-01: Mount with whitespace within sharename and mountpoint. ✔ Mount /mnt/Research & Development should be mounted ✔ Mount /mnt/Research & Development device should eq "//fileserver.corp.internal/Research & Development" ``` Signed-off-by: Markus Grobelin <grobi@koppzu.de> * mounts_with_whitespaces: make lint happy Signed-off-by: Markus Grobelin <grobi@koppzu.de> * mount resource: added parentheses as suggested by https://github.com/chef/inspec/pull/2257/files Signed-off-by: Markus Grobelin <grobi@koppzu.de> * mount resource: fix for Device-/Sharenames and Mountpoints including whitespaces Signed-off-by: Markus Grobelin <grobi@koppzu.de> |
||
---|---|---|
.. | ||
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 |