--- security.functions 2018-08-13 09:15:30.750905000 +0200 +++ /etc/periodic/security/security.functions 2018-08-13 09:22:53.467299000 +0200 @@ -65,6 +65,8 @@ cat > ${tmpf} fi + tmpo=`mktemp -t security` + if [ ! -f ${LOG}/${label}.today ]; then rc=1 echo "" @@ -72,16 +74,22 @@ cp ${tmpf} ${LOG}/${label}.today || rc=3 fi - if ! cmp -s ${LOG}/${label}.today ${tmpf} >/dev/null; then + diff ${security_status_diff_flags} ${LOG}/${label}.today \ + ${tmpf} | eval "${filter}" > ${tmpo} + + if [ -s ${tmpo} ]; then [ $rc -lt 1 ] && rc=1 echo "" echo "${msg}" diff ${security_status_diff_flags} ${LOG}/${label}.today \ ${tmpf} | eval "${filter}" + fi + + if ! cmp -s ${LOG}/${label}.today ${tmpf} >/dev/null; then mv ${LOG}/${label}.today ${LOG}/${label}.yesterday || rc=3 mv ${tmpf} ${LOG}/${label}.today || rc=3 fi - rm -f ${tmpf} + rm -f ${tmpf} ${tmpo} exit ${rc} }