fix grep in IS_TMPNOEXEC
This commit is contained in:
parent
92dd7d4f26
commit
905ef88c49
|
@ -255,9 +255,9 @@ check_tmpnoexec() {
|
|||
FINDMNT_BIN=$(command -v findmnt)
|
||||
if [ -x ${FINDMNT_BIN} ]; then
|
||||
options=$(${FINDMNT_BIN} --noheadings --first-only --output OPTIONS /tmp)
|
||||
grep -qE "\bnoexec\b" ${options} || failed "IS_TMPNOEXEC" "/tmp is not mounted with 'noexec'"
|
||||
echo "${options}" | grep -qE "\bnoexec\b" || failed "IS_TMPNOEXEC" "/tmp is not mounted with 'noexec'"
|
||||
else
|
||||
mount | grep "on /tmp" | grep -q noexec || failed "IS_TMPNOEXEC" "/tmp is not mounted with 'noexec' (WARNING: findmnt(8) is not found)"
|
||||
mount | grep "on /tmp" | grep -qE "\bnoexec\b" || failed "IS_TMPNOEXEC" "/tmp is not mounted with 'noexec' (WARNING: findmnt(8) is not found)"
|
||||
fi
|
||||
}
|
||||
check_mountfstab() {
|
||||
|
|
Loading…
Reference in a new issue