Bug 230589 - periodic scripts generate spurious emails
Summary: periodic scripts generate spurious emails
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-13 09:10 UTC by topical
Modified: 2024-11-10 21:41 UTC (History)
1 user (show)

See Also:


Attachments
Make "check_diff new_only" not generate spurious emails (993 bytes, patch)
2018-08-13 09:10 UTC, topical
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description topical 2018-08-13 09:10:37 UTC
Created attachment 196152 [details]
Make "check_diff new_only" not generate spurious emails

Many periodic scripts check log files and generate an email if there is something new.

Often, you receive spurious emails like this:

> myhost kernel log messages:
>  
> -- End of security output --

Obviously, there are no log messages to report.

Reason is a logic error in "check_diff new_only" which should generates a message only if there are new lines in given log. Unfortunately, a message is also generated if there are __removed__ lines, even though those removed lines are not shown (and not meant to be shown).

I've attached a fix.
Comment 1 topical 2019-01-22 07:19:38 UTC
I still get spurious get emails from periodic security scripts.

Could you/someone please apply the patch?
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2024-09-28 00:44:06 UTC
Comment on attachment 196152 [details]
Make "check_diff new_only" not generate spurious emails

^Triage: adjust to modern standards.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2024-09-28 00:44:47 UTC
^Triage: clear the now obsolete 'patch' keyword.

To submitter: is this aging PR still relevant?
Comment 4 topical 2024-11-10 21:41:49 UTC
Meanwhile there was a patch applied solving exactly this issue:

Commit 05ef7ed Use '^[>+][^+]' instead of '^[>+]' with grep(1) when filtering the
diff(1) output between two files in "new_only"-mode

So, this PR can be closed.