Fix a bug for 8.2.5: when syslog-ng has installed, pass this check item.
This commit is contained in:
parent
efb9efafdc
commit
b762376882
|
@ -15,9 +15,14 @@ set -u # One variable unset, it's over
|
||||||
HARDENING_LEVEL=3
|
HARDENING_LEVEL=3
|
||||||
|
|
||||||
PATTERN='^*.*[^I][^I]*@'
|
PATTERN='^*.*[^I][^I]*@'
|
||||||
|
PACKAGE_NG='syslog-ng'
|
||||||
|
|
||||||
# This function will be called if the script status is on enabled / audit mode
|
# This function will be called if the script status is on enabled / audit mode
|
||||||
audit () {
|
audit () {
|
||||||
|
is_pkg_installed $PACKAGE_NG
|
||||||
|
if [ $FNRET = 0 ]; then
|
||||||
|
ok "$PACKAGE_NG has installed, so pass."
|
||||||
|
else
|
||||||
FILES="$SYSLOG_BASEDIR/rsyslog.conf $SYSLOG_BASEDIR/rsyslog.d/*.conf"
|
FILES="$SYSLOG_BASEDIR/rsyslog.conf $SYSLOG_BASEDIR/rsyslog.d/*.conf"
|
||||||
does_pattern_exist_in_file "$FILES" "$PATTERN"
|
does_pattern_exist_in_file "$FILES" "$PATTERN"
|
||||||
if [ $FNRET != 0 ]; then
|
if [ $FNRET != 0 ]; then
|
||||||
|
@ -25,10 +30,15 @@ audit () {
|
||||||
else
|
else
|
||||||
ok "$PATTERN is present in $FILES"
|
ok "$PATTERN is present in $FILES"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function will be called if the script status is on enabled mode
|
# This function will be called if the script status is on enabled mode
|
||||||
apply () {
|
apply () {
|
||||||
|
is_pkg_installed $PACKAGE_NG
|
||||||
|
if [ $FNRET = 0 ]; then
|
||||||
|
ok "$PACKAGE_NG has installed, so pass."
|
||||||
|
else
|
||||||
FILES="$SYSLOG_BASEDIR/rsyslog.conf $SYSLOG_BASEDIR/rsyslog.d/*.conf"
|
FILES="$SYSLOG_BASEDIR/rsyslog.conf $SYSLOG_BASEDIR/rsyslog.d/*.conf"
|
||||||
does_pattern_exist_in_file "$FILES" "$PATTERN"
|
does_pattern_exist_in_file "$FILES" "$PATTERN"
|
||||||
if [ $FNRET != 0 ]; then
|
if [ $FNRET != 0 ]; then
|
||||||
|
@ -36,6 +46,7 @@ apply () {
|
||||||
else
|
else
|
||||||
ok "$PATTERN is present in $FILES"
|
ok "$PATTERN is present in $FILES"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function will create the config file for this check with default values
|
# This function will create the config file for this check with default values
|
||||||
|
|
Loading…
Reference in New Issue