From: David Woodhouse Date: Sat, 27 Aug 2005 09:25:43 +0000 (+0100) Subject: [AUDIT] Allow filtering on system call success _or_ failure X-Git-Tag: v2.6.14-rc2~49^2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b01f2cc1c37ac3d5ca313c90370a586dffe5aca9;p=linux-2.6 [AUDIT] Allow filtering on system call success _or_ failure Signed-off-by: David Woodhouse --- diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 488ba3dea8..88696f639a 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -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) {