mirror of https://github.com/CISOfy/lynis.git
[FILE-6372] Ignore comments in /etc/fstab
This commit is contained in:
parent
5aa1a27e32
commit
11d0dabf4f
|
@ -445,7 +445,7 @@
|
|||
Register --test-no FILE-6372 --os Linux --weight L --network NO --description "Checking / mount options"
|
||||
if [ ${SKIPTEST} -eq 0 ]; then
|
||||
if [ -f /etc/fstab ]; then
|
||||
FIND=`cat /etc/fstab | awk '{ if ($2=="/") { print $4 } }'`
|
||||
FIND=`cat /etc/fstab | grep -v "^#" | awk '{ if ($2=="/") { print $4 } }'`
|
||||
NODEV=`echo ${FIND} | awk '{ if ($1=="nodev") { print "YES" } else { print "NO" } }'`
|
||||
NOEXEC=`echo ${FIND} | awk '{ if ($1=="noexec") { print "YES" } else { print "NO" } }'`
|
||||
NOSUID=`echo ${FIND} | awk '{ if ($1=="nosuid") { print "YES" } else { print "NO" } }'`
|
||||
|
|
Loading…
Reference in New Issue