mirror of https://github.com/CISOfy/lynis.git
Undoed submitted pull request as it breaks testing at least on Ubuntu system
This commit is contained in:
parent
137dc6f0cc
commit
256bc1da0f
|
@ -566,7 +566,7 @@
|
||||||
for I in ${FILESYSTEMS_TO_CHECK}; do
|
for I in ${FILESYSTEMS_TO_CHECK}; do
|
||||||
FILESYSTEM=$(echo ${I} | ${CUTBINARY} -d: -f1)
|
FILESYSTEM=$(echo ${I} | ${CUTBINARY} -d: -f1)
|
||||||
EXPECTED_FLAGS=$(echo ${I} | ${CUTBINARY} -d: -f2 | ${SEDBINARY} 's/,/ /g')
|
EXPECTED_FLAGS=$(echo ${I} | ${CUTBINARY} -d: -f2 | ${SEDBINARY} 's/,/ /g')
|
||||||
FS_FSTAB=$(${AWKBINARY} -v fs=${FILESYSTEM} '{ if ($2==fs) { print $3 } }' /etc/fstab)
|
FS_FSTAB=$(${AWKBINARY} -v fs=${FILESYSTEM} '{ if ($2==fs) { print $3 } }' ${ROOTDIR}etc/fstab)
|
||||||
if [ "${FS_FSTAB}" = "glusterfs" ]; then
|
if [ "${FS_FSTAB}" = "glusterfs" ]; then
|
||||||
EXPECTED_FLAGS=$(echo ${EXPECTED_FLAGS} | ${SEDBINARY} 's/\<\(nodev\|nosuid\)\> *//g')
|
EXPECTED_FLAGS=$(echo ${EXPECTED_FLAGS} | ${SEDBINARY} 's/\<\(nodev\|nosuid\)\> *//g')
|
||||||
if [ -z "${EXPECTED_FLAGS}" ]; then
|
if [ -z "${EXPECTED_FLAGS}" ]; then
|
||||||
|
@ -574,7 +574,7 @@
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -z "${FS_FSTAB}" ]; then
|
if [ ! -z "${FS_FSTAB}" ]; then
|
||||||
FOUND_FLAGS=$(${AWKBINARY} -v fs=${FILESYSTEM} '{ if ($2==fs) { print $4 } }' /etc/fstab | ${SEDBINARY} 's/,/ /g' | ${TRBINARY} -d '\n')
|
FOUND_FLAGS=$(${AWKBINARY} -v fs=${FILESYSTEM} '{ if ($2==fs) { print $4 } }' ${ROOTDIR}etc/fstab | ${SEDBINARY} 's/,/ /g' | ${TRBINARY} '\n' ' ')
|
||||||
LogText "File system: ${FILESYSTEM}"
|
LogText "File system: ${FILESYSTEM}"
|
||||||
LogText "Expected flags: ${EXPECTED_FLAGS}"
|
LogText "Expected flags: ${EXPECTED_FLAGS}"
|
||||||
LogText "Found flags: ${FOUND_FLAGS}"
|
LogText "Found flags: ${FOUND_FLAGS}"
|
||||||
|
@ -582,7 +582,7 @@
|
||||||
FULLY_HARDENED=1
|
FULLY_HARDENED=1
|
||||||
for FLAG in ${EXPECTED_FLAGS}; do
|
for FLAG in ${EXPECTED_FLAGS}; do
|
||||||
FLAG_AVAILABLE=$(echo ${FOUND_FLAGS} | ${GREPBINARY} ${FLAG})
|
FLAG_AVAILABLE=$(echo ${FOUND_FLAGS} | ${GREPBINARY} ${FLAG})
|
||||||
if [ "${FLAG_AVAILABLE}" = "" ]; then
|
if [ -z "${FLAG_AVAILABLE}" ]; then
|
||||||
LogText "Result: Could not find mount option ${FLAG} on file system ${FILESYSTEM}"
|
LogText "Result: Could not find mount option ${FLAG} on file system ${FILESYSTEM}"
|
||||||
FULLY_HARDENED=0
|
FULLY_HARDENED=0
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue