mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 15:47:36 +00:00
audit: explicitly check audit_context->context enum value
[ Upstream commit3ed66951f9
] Be explicit in checking the struct audit_context "context" member enum value rather than assuming the order of context enum values. Fixes:12c5e81d3f
("audit: prepare audit_context for use in calling contexts beyond syscalls") Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
9eb5fff6b0
commit
b6bf224638
1 changed files with 1 additions and 1 deletions
|
@ -2069,7 +2069,7 @@ void __audit_syscall_exit(int success, long return_code)
|
|||
/* run through both filters to ensure we set the filterkey properly */
|
||||
audit_filter_syscall(current, context);
|
||||
audit_filter_inodes(current, context);
|
||||
if (context->current_state < AUDIT_STATE_RECORD)
|
||||
if (context->current_state != AUDIT_STATE_RECORD)
|
||||
goto out;
|
||||
|
||||
audit_log_exit();
|
||||
|
|
Loading…
Reference in a new issue