Fix bugs for 10.1.7 and 10.1.8

This commit is contained in:
samson 2018-12-09 15:58:06 +08:00
parent ded285c533
commit 9d4dc5f1c4
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ audit ()
FNRET=1
else
ok "$NOPASSWD is not set on $FILE, it's ok"
if [ $(grep -c $NOPASSWD $INCLUDFILE) -gt 0 ]; then
if [ $(grep $NOPASSWD $INCLUDFILE | wc -l) -gt 0 ]; then
crit "$NOPASSWD is set on $INCLUDFILE, it's error conf"
FNRET=1
else

View File

@ -33,7 +33,7 @@ audit ()
FNRET=1
else
ok "$NOAUTH is not set on $FILE, it's ok"
if [ $(grep -c $NOAUTH $INCLUDFILE) -gt 0 ]; then
if [ $(grep $NOAUTH $INCLUDFILE | wc -l) -gt 0 ]; then
crit "$NOAUTH is set on $INCLUDFILE, it's error conf"
FNRET=1
else