Skip to content

Commit 3ed6695

Browse files
rgbriggspcmoore
authored andcommitted
audit: explicitly check audit_context->context enum value
Be explicit in checking the struct audit_context "context" member enum value rather than assuming the order of context enum values. Fixes: 12c5e81 ("audit: prepare audit_context for use in calling contexts beyond syscalls") Signed-off-by: Richard Guy Briggs <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent e84d9f5 commit 3ed6695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/auditsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2068,7 +2068,7 @@ void __audit_syscall_exit(int success, long return_code)
20682068
/* run through both filters to ensure we set the filterkey properly */
20692069
audit_filter_syscall(current, context);
20702070
audit_filter_inodes(current, context);
2071-
if (context->current_state < AUDIT_STATE_RECORD)
2071+
if (context->current_state != AUDIT_STATE_RECORD)
20722072
goto out;
20732073

20742074
audit_return_fixup(context, success, return_code);

0 commit comments

Comments
 (0)