audit: re-structure audit field valid checks
authorRichard Guy Briggs <rgb@redhat.com>
Wed, 22 May 2019 21:51:09 +0000 (17:51 -0400)
committerPaul Moore <paul@paul-moore.com>
Fri, 24 May 2019 01:05:08 +0000 (21:05 -0400)
commitecc68904a3e5efb07cb4f0b97d15c7e0e4623d13
tree985240aa63f2a885eb88a2222d4e05c09248121b
parentb48345aafb203803ccda4488cb5409b1ed435c0a
audit: re-structure audit field valid checks

Multiple checks were being done in one switch case statement that
started to cause some redundancies and awkward exceptions.  Separate the
valid field and op check from the select valid values checks.

Enforce the elimination of meaningless bitwise and greater/lessthan
checks on string fields and other fields with unrelated scalar values.

Please see the github issue
https://github.com/linux-audit/audit-kernel/issues/73

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/auditfilter.c