Message ID | 20220111215446.595516-2-jwcart2@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 521e6ad71396 |
Headers | show |
Series | Refactor and fix assertion checking | expand |
diff --git a/libsepol/src/assertion.c b/libsepol/src/assertion.c index dd2749a0..ba4a204f 100644 --- a/libsepol/src/assertion.c +++ b/libsepol/src/assertion.c @@ -538,6 +538,10 @@ int check_assertions(sepol_handle_t * handle, policydb_t * p, if (!(a->specified & (AVRULE_NEVERALLOW | AVRULE_XPERMS_NEVERALLOW))) continue; rc = check_assertion(p, a); + if (rc < 0) { + ERR(handle, "Error occurred while checking neverallows"); + return -1; + } if (rc) { rc = report_assertion_failures(handle, p, a); if (rc < 0) {
Instead of calling report_assertion_failures() and treating an error like it was a neverallow violation, just return an error. Signed-off-by: James Carter <jwcart2@gmail.com> --- libsepol/src/assertion.c | 4 ++++ 1 file changed, 4 insertions(+)