diff mbox series

[RFC,3/4] libsepol/cil: post process pirqcon rules

Message ID 20220331144752.31495-3-cgzones@googlemail.com (mailing list archive)
State Accepted
Headers show
Series [RFC,1/4] libsepol/cil: declare file local functions static | expand

Commit Message

Christian Göttsche March 31, 2022, 2:47 p.m. UTC
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libsepol/cil/src/cil_post.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

James Carter April 1, 2022, 8:51 p.m. UTC | #1
On Thu, Mar 31, 2022 at 3:36 PM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

Acked-by: James Carter <jwcart2@gmail.com>

> ---
>  libsepol/cil/src/cil_post.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/libsepol/cil/src/cil_post.c b/libsepol/cil/src/cil_post.c
> index 7f33cd9e..714ce227 100644
> --- a/libsepol/cil/src/cil_post.c
> +++ b/libsepol/cil/src/cil_post.c
> @@ -2434,6 +2434,12 @@ static int cil_post_db(struct cil_db *db)
>                 goto exit;
>         }
>
> +       rc = __cil_post_process_context_rules(db->pirqcon, cil_post_pirqcon_compare, cil_post_pirqcon_context_compare, db, CIL_PIRQCON, CIL_KEY_IOMEMCON);
> +       if (rc != SEPOL_OK) {
> +               cil_log(CIL_ERR, "Problems processing pirqcon rules\n");
> +               goto exit;
> +       }
> +
>         rc = __cil_post_process_context_rules(db->iomemcon, cil_post_iomemcon_compare, cil_post_iomemcon_context_compare, db, CIL_IOMEMCON, CIL_KEY_IOMEMCON);
>         if (rc != SEPOL_OK) {
>                 cil_log(CIL_ERR, "Problems processing iomemcon rules\n");
> --
> 2.35.1
>
diff mbox series

Patch

diff --git a/libsepol/cil/src/cil_post.c b/libsepol/cil/src/cil_post.c
index 7f33cd9e..714ce227 100644
--- a/libsepol/cil/src/cil_post.c
+++ b/libsepol/cil/src/cil_post.c
@@ -2434,6 +2434,12 @@  static int cil_post_db(struct cil_db *db)
 		goto exit;
 	}
 
+	rc = __cil_post_process_context_rules(db->pirqcon, cil_post_pirqcon_compare, cil_post_pirqcon_context_compare, db, CIL_PIRQCON, CIL_KEY_IOMEMCON);
+	if (rc != SEPOL_OK) {
+		cil_log(CIL_ERR, "Problems processing pirqcon rules\n");
+		goto exit;
+	}
+
 	rc = __cil_post_process_context_rules(db->iomemcon, cil_post_iomemcon_compare, cil_post_iomemcon_context_compare, db, CIL_IOMEMCON, CIL_KEY_IOMEMCON);
 	if (rc != SEPOL_OK) {
 		cil_log(CIL_ERR, "Problems processing iomemcon rules\n");