Fix a bug for 8.1.16

This commit is contained in:
Samson-W 2019-04-21 06:30:22 +08:00
parent 6157ec0bfc
commit 6412559d7d

View File

@ -41,6 +41,9 @@ audit () {
# This function will be called if the script status is on enabled mode
apply () {
# define custom IFS and save default one
d_IFS=$IFS
IFS=$'\n'
if [ $FNRET = 1 ]; then
warn "file $SUDOLOG is not exist! Set default logfile path in /etc/sudoers."
sed -i '$aDefaults logfile="/var/log/sudo.log"' /etc/sudoers
@ -57,6 +60,7 @@ apply () {
else
ok "$AUDIT_VALUE is present in $FILE"
fi
IFS=$d_IFS
}
# This function will check config parameters required