Skip to content

Commit

Permalink
[AUDIT] Allow filtering on system call success _or_ failure
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
David Woodhouse committed Aug 27, 2005
1 parent 1788822 commit b01f2cc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,12 @@ static int audit_filter_rules(struct task_struct *tsk,
result = (ctx->return_code == value);
break;
case AUDIT_SUCCESS:
if (ctx && ctx->return_valid)
result = (ctx->return_valid == AUDITSC_SUCCESS);
if (ctx && ctx->return_valid) {
if (value)
result = (ctx->return_valid == AUDITSC_SUCCESS);
else
result = (ctx->return_valid == AUDITSC_FAILURE);
}
break;
case AUDIT_DEVMAJOR:
if (ctx) {
Expand Down

0 comments on commit b01f2cc

Please sign in to comment.