summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-08-27 10:25:43 +0100
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-08-27 10:25:43 +0100
commitb01f2cc1c37ac3d5ca313c90370a586dffe5aca9 (patch)
tree04fb64e730b6e36293c30cade3606cf53c8c8e20 /kernel
parent17888225c2f392bfdbac6c7f0713cbd9a4d02b05 (diff)
downloadop-kernel-dev-b01f2cc1c37ac3d5ca313c90370a586dffe5aca9.zip
op-kernel-dev-b01f2cc1c37ac3d5ca313c90370a586dffe5aca9.tar.gz
[AUDIT] Allow filtering on system call success _or_ failure
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditsc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 488ba3d..88696f6 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) {
OpenPOWER on IntegriCloud