Fix a bug of 4.6

This commit is contained in:
Samson-W 2020-06-04 17:48:55 +08:00
parent 243d6b57af
commit 303f280bb4

View File

@ -68,7 +68,8 @@ audit_centos () {
if [ $FNRET -eq 0 ]; then
if [ $(grep -c selinux $LSM_RUN_STATUS_FILE) -eq 1 ]; then
ok "SELinux was activated."
if [ $(getenforce | grep -c Enforcing) -eq 1 ]; then
does_valid_pattern_exist_in_file $SELINUXCONF_FILE $SELINUXENFORCE_MODE
if [ ${FNRET} -eq 0 -a $(getenforce | grep -c 'Enforcing') -eq 1 ]; then
ok "SELinux is in Enforcing mode."
FNRET=0
else