Bug 2208963
| Summary: | ausearch fails when called from cron script | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | John Dodson <jwadodson> |
| Component: | audit | Assignee: | Steve Grubb <sgrubb> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 37 | CC: | scorreia, sgrubb |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-05-23 15:07:41 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
John Dodson
2023-05-22 08:16:36 UTC
ausearch prefers input from pipes if stdin is a pipe. In cron scripts stdin/out/err are pipes. So, it mistakenly waits for something on stdin. The fix is to use --input-logs so that it overrides the normal behavior. This behavior has been in place for at least the last 15 years. How is stdin suddenly a pipe? (A change to cron?)
"This behaviour has been in place for at least the last 15 years."
^^^^^^^^^
Sadly that is not true.
This happened with audit-3.1.1-1.fc37.x86_64
So someone obviously fixed the bug that had it broken (from the way you thought it worked) for
the last 15 years.
Otherwise why has it worked for me for the last 15 years? (in cron scripts?)
Maybe it's another of the things that has affected cron recently (selinux limits).
In any case --input-logs does now allow it to work again as it did last week
in a cron script without that option!
Glad it's working for you now. No idea why it worked for you. The --input-logs is specifically to be used for cron jobs. You can see here people were asking questions about this 15 years ago: https://listman.redhat.com/archives/linux-audit/2008-May/005276.html I think we can close this. This is not in "redhat" it's in fedora. Maybe it coincided with moving it from cron.daily to a discrete cron job? Ok please close... It might be the result of switching from cron.daily to something else. I also have no idea if running it from a systemd timer would change things either. In any event, it is working so I'll close this report. If you run into other problems with ausearch/cron, feel free to re-open. |