Bug 1271669
| Summary: | audit2allow cannot parse boot date in some locales | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Dalibor Pospíšil <dapospis> |
| Component: | audit | Assignee: | Steve Grubb <sgrubb> |
| Status: | CLOSED ERRATA | QA Contact: | Ondrej Moriš <omoris> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.2 | CC: | dapospis, dwalsh, lvrabec, mgrepl, mmalik, omoris, pkis, plautrba, pmoore, pvrabec, sgrubb, ssekidde |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | audit-2.5.2-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-11-04 06:12:25 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Dalibor Pospíšil
2015-10-14 13:24:42 UTC
I tested this on F22, and it doesn't seem to have this problem. But then again I have logs that are recorded in en_US.UTF-8. What version of audit is being used? Can you include 2 or 3 lines out logs generated from this command: # grep audit /var/log/messages | grep 1400 Thanks After reboot I get: # LANG=ar_AE audit2allow -b Invalid start time (CET 10:36:03 ). Hour, Minute, and Second are required. # grep audit /var/log/messages Nov 10 07:45:01 sopos-rhel7-brq auditd[562]: Audit daemon rotating log files What I was asking for is samples of the logs that are causing the problems. I specifically wanted the ones with 1400 because those are AVC's. You also didn't answer the question about which version of audit you are using. When I use the one and only one log line you pasted, I cannot reproduce the problem. # echo "Nov 10 07:45:01 sopos-rhel7-brq auditd[562]: Audit daemon rotating log files" | LANG=ar_AE audit2allow -b <no matches> If I can't reproduce the error, I can't fix it. Thanks. I use audit-2.4.1-5.el7. Actually I do not know where the boot timestamp comes form so I cannot check the format. Going back to comment #2, I need some log samples to look at. Can you run the following for me: # grep 'type=AVC' /var/log/audit/audit.log | head -n 3 Looking through the sepolgen code I find this:
fd=open("/proc/uptime", "r")
off=float(fd.read().split()[0])
fd.close
s = time.localtime(time.time() - off)
bootdate = time.strftime("%x", s)
boottime = time.strftime("%X", s)
output = subprocess.Popen(["/sbin/ausearch", "-m", "AVC,USER_AVC,MAC_POLICY_LOAD,DAEMON_START,SELINUX_ERR", "-ts", bootdate, boottime],
Based on that, I'm inclined to believe this bz is a duplicate of Bug #1286633.
audit-2.5.2-1.el7 has been built to address this issue Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2418.html |