audit: explicitly check audit_context->context enum value
authorRichard Guy Briggs <rgb@redhat.com>
Thu, 25 Aug 2022 19:32:38 +0000 (15:32 -0400)
committerPaul Moore <paul@paul-moore.com>
Fri, 26 Aug 2022 21:17:11 +0000 (17:17 -0400)
commit3ed66951f952ed8f1a5d03e171722bf2631e8d58
treee80a33c9ef4b4c7823d92bfd85b1c298d0f0c1cd
parente84d9f5214cb854fcd584aa78b5634794604d306
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: 12c5e81d3fd0 ("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>
kernel/auditsc.c