aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/auditsc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 488ba3dea8bb..88696f639aab 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -440,8 +440,12 @@ static int audit_filter_rules(struct task_struct *tsk,
440 result = (ctx->return_code == value); 440 result = (ctx->return_code == value);
441 break; 441 break;
442 case AUDIT_SUCCESS: 442 case AUDIT_SUCCESS:
443 if (ctx && ctx->return_valid) 443 if (ctx && ctx->return_valid) {
444 result = (ctx->return_valid == AUDITSC_SUCCESS); 444 if (value)
445 result = (ctx->return_valid == AUDITSC_SUCCESS);
446 else
447 result = (ctx->return_valid == AUDITSC_FAILURE);
448 }
445 break; 449 break;
446 case AUDIT_DEVMAJOR: 450 case AUDIT_DEVMAJOR:
447 if (ctx) { 451 if (ctx) {