Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mount resource incorrect matching #103

Closed
alexpop opened this issue May 12, 2016 · 0 comments · Fixed by #104
Closed

mount resource incorrect matching #103

alexpop opened this issue May 12, 2016 · 0 comments · Fixed by #104
Labels
Type: Bug Feature not working as expected

Comments

@alexpop
Copy link
Contributor

alexpop commented May 12, 2016

As can be seen on this CentOS 7 box, /var is reported by inspec as mounted:

[1] pry(#<#<Class:0x007fe3a3ca6d48>>)> mount('/var').mounted?
=> true
[2] pry(#<#<Class:0x007fe3a3ca6d48>>)> mount('/var').options
=> ["rw", "relatime"]

This is because on this CentOS 7 box, /var matches another mount point that starts with /var:

[root@192 ~]# mount | grep -- ' on /var'
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)

The grep filter here needs to be restricted a bit more, something like:

[root@192 ~]# mount | grep -- ' on /var type '
[root@192 ~]# mount | grep -- ' on /sys/kernel/debug type '
debugfs on /sys/kernel/debug type debugfs (rw,relatime)

Need to test this on a few supported systems.

@alexpop alexpop added the bug label May 12, 2016
@clintoncwolfe clintoncwolfe added Type: Bug Feature not working as expected and removed Type: Bug labels Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants