Skip to content

Commit d5345f3

Browse files
committed
Handle selinux /var/run to /run transition
Signed-off-by: Radovan Sroka <rsroka@redhat.com>
1 parent 03fb4f5 commit d5345f3

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

fapolicyd-selinux-var-run.patch

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 750c5e288f8253c71a9722da960addb078aee93c Mon Sep 17 00:00:00 2001
2+
From: Zdenek Pytela <zpytela@redhat.com>
3+
Date: Tue, 6 Feb 2024 21:17:27 +0100
4+
Subject: [PATCH] Rename all /var/run file context entries to /run
5+
6+
With the 1f76e522a ("Rename all /var/run file context entries to /run")
7+
selinux-policy commit, all /var/run file context entries moved to /run
8+
and the equivalency was inverted. Subsequently, changes in fapolicyd.fc
9+
need to be done, too, in a similar manner.
10+
---
11+
fapolicyd.fc | 4 ++--
12+
1 file changed, 2 insertions(+), 2 deletions(-)
13+
14+
diff --git a/fapolicyd-selinux-master/fapolicyd.fc b/fapolicyd-selinux-master/fapolicyd.fc
15+
index 2bdc7aa..d081dc8 100644
16+
--- a/fapolicyd-selinux-master/fapolicyd.fc
17+
+++ b/fapolicyd-selinux-master/fapolicyd.fc
18+
@@ -8,6 +8,6 @@
19+
20+
/var/log/fapolicyd-access.log -- gen_context(system_u:object_r:fapolicyd_log_t,s0)
21+
22+
-/var/run/fapolicyd(/.*)? gen_context(system_u:object_r:fapolicyd_var_run_t,s0)
23+
+/run/fapolicyd(/.*)? gen_context(system_u:object_r:fapolicyd_var_run_t,s0)
24+
25+
-/var/run/fapolicyd\.pid -- gen_context(system_u:object_r:fapolicyd_var_run_t,s0)
26+
+/run/fapolicyd\.pid -- gen_context(system_u:object_r:fapolicyd_var_run_t,s0)
27+
--
28+
2.44.0
29+

fapolicyd.spec

+14-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Requires(preun): systemd-units
2727
Requires(postun): systemd-units
2828

2929
#ELN Patch1: fapolicyd-uthash-bundle.patch
30+
#ELN Patch2: fapolicyd-selinux-var-run.patch
3031

3132
%description
3233
Fapolicyd (File Access Policy Daemon) implements application whitelisting
@@ -63,7 +64,19 @@ makes use of the kernel's fanotify interface to determine file access rights.
6364
#ELN %if 0%{?rhel} != 0
6465
#ELN # uthash
6566
#ELN %setup -q -D -T -a 2
66-
#ELN %patch1 -p1 -b .uthash
67+
#ELN %patch -P1 -p1 -b .uthash
68+
#ELN %endif
69+
70+
#ELN %if 0%{?fedora} < 40
71+
#ELN %define selinux_var_run 1
72+
#ELN %endif
73+
74+
#ELN %if 0%{?rhel} < 10
75+
#ELN %define selinux_var_run 1
76+
#ELN %endif
77+
78+
#ELN %if %{defined selinux_var_run}
79+
#ELN %patch -P2 -R -p1 -b .selinux
6780
#ELN %endif
6881

6982
# generate rules for python

0 commit comments

Comments
 (0)