fapolicyd/fapolicyd-normal-pattern.patch
Radovan Sroka 3dbf4735dd
RHEL 9.7.0 ERRATUM
- RPMDB crashes with SIGBUS when updating the RPMDB repeatedly
Resolves: RHEL-63090
- File /run/fapolicyd differs from RPM expectations
Resolves: RHEL-59626
- fapolicyd.service badly instructs how to start after nss-user-lookup.target
Resolves: RHEL-21871
- fapolicy rule containing 'pattern=normal' produces error
Resolves: RHEL-30020

Signed-off-by: Radovan Sroka <rsroka@redhat.com>
2025-05-30 14:23:13 +02:00

28 lines
972 B
Diff

From 0b42573e129c8c095536e15b326fe76b87da2601 Mon Sep 17 00:00:00 2001
From: Radovan Sroka <rsroka@redhat.com>
Date: Fri, 28 Feb 2025 18:02:16 +0100
Subject: [PATCH] Fix normal pattern handling
Signed-off-by: Radovan Sroka <rsroka@redhat.com>
---
src/library/rules.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/library/rules.c b/src/library/rules.c
index 849a6c39..7f8fc7f5 100644
--- a/src/library/rules.c
+++ b/src/library/rules.c
@@ -406,9 +406,10 @@ static int assign_subject(lnode *n, int type, const char *ptr2, int lineno)
goto free_and_error;
}
- if (strcmp(tmp,
- PATTERN_LD_SO_STR) == 0) {
+ if (strcmp(tmp, PATTERN_LD_SO_STR) == 0) {
n->s[i].val = PATTERN_LD_SO_VAL;
+ } else if (strcmp(tmp, PATTERN_NORMAL_STR) == 0) {
+ n->s[i].val = PATTERN_NORMAL_VAL;
} else if (strcmp(tmp, PATTERN_STATIC_STR) == 0) {
n->s[i].val = PATTERN_STATIC_VAL;
} else if (strcmp(tmp, PATTERN_LD_PRELOAD_STR) == 0) {