[PATCH] audit: remove the BUG() calls in the audit rule comparison functions
Richard Guy Briggs
rgb at redhat.com
Thu May 30 19:33:52 UTC 2019
On 2019-05-30 12:55, Paul Moore wrote:
> The audit_data_to_entry() function ensures that the operator is valid
> so we can get rid of these BUG() calls. We keep the "return 0" just
> so the system behaves in a sane-ish manner should something go
> horribly wrong.
>
> Signed-off-by: Paul Moore <paul at paul-moore.com>
Acked-by: Richard Guy Briggs <rgb at redhat.com>
> ---
> kernel/auditfilter.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
> index e69d136eeaf6..1a21b6aa50d1 100644
> --- a/kernel/auditfilter.c
> +++ b/kernel/auditfilter.c
> @@ -1220,7 +1220,6 @@ int audit_comparator(u32 left, u32 op, u32 right)
> case Audit_bittest:
> return ((left & right) == right);
> default:
> - BUG();
> return 0;
> }
> }
> @@ -1243,7 +1242,6 @@ int audit_uid_comparator(kuid_t left, u32 op, kuid_t right)
> case Audit_bitmask:
> case Audit_bittest:
> default:
> - BUG();
> return 0;
> }
> }
> @@ -1266,7 +1264,6 @@ int audit_gid_comparator(kgid_t left, u32 op, kgid_t right)
> case Audit_bitmask:
> case Audit_bittest:
> default:
> - BUG();
> return 0;
> }
> }
>
> --
> Linux-audit mailing list
> Linux-audit at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-audit
- RGB
--
Richard Guy Briggs <rgb at redhat.com>
Sr. S/W Engineer, Kernel Security, Base Operating Systems
Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635
More information about the Linux-audit
mailing list