Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 839d05e4 authored by Paul Moore's avatar Paul Moore
Browse files

audit: remove the BUG() calls in the audit rule comparison functions



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: default avatarPaul Moore <paul@paul-moore.com>
Acked-by: default avatarRichard Guy Briggs <rgb@redhat.com>
parent 0223fad3
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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;
	}
}