Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions src/ausearch-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -2037,19 +2037,21 @@ static int parse_avc(const lnode *n, search_items *s)
term = n->message;
goto other_avc;
}
// Do not override syscall success if already set.
// Syscall pass/fail is the authoritative value.
if (event_success != S_UNSET && s->success == S_UNSET) {
*term = 0;
if (strstr(str, "denied")) {
// Always record the AVC verdict (denied/granted) from the record.
// Only propagate it to s->success when a success filter is active
// and s->success hasn't been set yet; syscall pass/fail is the
// authoritative value and must not be overwritten.
*term = 0;
if (strstr(str, "denied")) {
an.avc_result = AVC_DENIED;
if (event_success != S_UNSET && s->success == S_UNSET)
s->success = S_FAILED;
an.avc_result = AVC_DENIED;
} else {
} else {
an.avc_result = AVC_GRANTED;
if (event_success != S_UNSET && s->success == S_UNSET)
s->success = S_SUCCESS;
an.avc_result = AVC_GRANTED;
}
*term = '{';
}
*term = '{';

// Now get permission
str = term + 1;
Expand Down
Loading