User space tools for 2.6 kernel auditing
Go to file
Cropi 7812953dbe aureport: fix AVC result always showing "unset" without a success filter
In parse_avc(), two unrelated concerns were bundled under one guard:

  if (event_success != S_UNSET && s->success == S_UNSET) {
      an.avc_result = AVC_DENIED / AVC_GRANTED;   /* concern 1 */
      s->success   = S_FAILED  / S_SUCCESS;        /* concern 2 */
  }

The guard was correct for concern 2: only propagate the AVC verdict to
s->success when the caller is filtering by success/failure and s->success
hasn't been set yet (syscall pass/fail is authoritative).

However, it also gated concern 1: populating an.avc_result, which is the
field aureport -a prints in the "result" column. Without --success or
--failed on the command line, event_success == S_UNSET, so the block was
skipped entirely and an.avc_result stayed at its initial AVC_UNSET value.
aulookup_result(AVC_UNSET) returns "unset", making the result column
always show "unset" regardless of what the AVC record actually says.

Fix: unconditionally extract the verdict from the record into an.avc_result,
and move the event_success guard to cover only the s->success assignment.

Resolves: RHEL-172047
Signed-off-by: Cropi <alakatos@redhat.com>
2026-08-12 10:43:07 +02:00
.fmf Enable RHEL gating for audit 2024-05-28 14:32:34 +02:00
.gitignore audit: rebase to 4.2.1 2026-08-06 13:51:02 +02:00
audit.spec aureport: fix AVC result always showing "unset" without a success filter 2026-08-12 10:43:07 +02:00
auditd-fix-16-byte-truncation-v1.patch audit: rebase to 4.2.1 2026-08-06 13:51:02 +02:00
auditd-fix-16-byte-truncation-v2.patch audit: rebase to 4.2.1 2026-08-06 13:51:02 +02:00
aureport-fix-AVC-unset-result.patch aureport: fix AVC result always showing "unset" without a success filter 2026-08-12 10:43:07 +02:00
ci_tests.fmf Enable RHEL gating for audit 2024-05-28 14:32:34 +02:00
gating.yaml Enable RHEL gating for audit 2024-05-28 14:32:34 +02:00
lgpl-2.1.txt fix license handling 2014-07-11 16:04:20 -04:00
revert-audit-run-dir.patch audit: rebase to 4.2.1 2026-08-06 13:51:02 +02:00
sources audit: rebase to 4.2.1 2026-08-06 13:51:02 +02:00