Skip to content

Commit

Permalink
sys-apps/apparmor: Fix hardcoded paths for loading apparmor functions
Browse files Browse the repository at this point in the history
Bug: https://bugs.gentoo.org/895302

Signed-off-by: Ao Luo <myloveyuxuan@gmail.com>
  • Loading branch information
FurudeRikaLiveOnHinami committed Mar 12, 2024
1 parent b688088 commit cde70a0
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
Expand Up @@ -36,6 +36,7 @@ S=${WORKDIR}/apparmor-${PV}/parser
PATCHES=(
"${FILESDIR}/${PN}-3.0.5-makefile.patch"
"${FILESDIR}/${PN}-2.11.1-dynamic-link.patch"
"${FILESDIR}/${PN}-3.1.4-fix-hardcoded-path.patch"
)

src_prepare() {
Expand Down
39 changes: 39 additions & 0 deletions sys-apps/apparmor/files/apparmor-3.1.4-fix-hardcoded-path.patch
@@ -0,0 +1,39 @@
diff --git a/apparmor.systemd b/apparmor.systemd
index 09d5792..156312a 100644
--- a/apparmor.systemd
+++ b/apparmor.systemd
@@ -15,7 +15,7 @@
# along with this program; if not, contact Novell, Inc.
# ----------------------------------------------------------------------

-APPARMOR_FUNCTIONS=/lib/apparmor/rc.apparmor.functions
+APPARMOR_FUNCTIONS=/usr/libexec/rc.apparmor.functions

aa_action()
{
diff --git a/profile-load b/profile-load
index 7591fb3..0759237 100755
--- a/profile-load
+++ b/profile-load
@@ -21,7 +21,7 @@

[ -z "$1" ] && exit 1 # require a profile name

-. /lib/apparmor/rc.apparmor.functions
+. /usr/libexec/rc.apparmor.functions

# do not load in a container
if [ -x /usr/bin/systemd-detect-virt ] && \
diff --git a/rc.apparmor.slackware b/rc.apparmor.slackware
index 64a527e..5aa12e5 100644
--- a/rc.apparmor.slackware
+++ b/rc.apparmor.slackware
@@ -18,7 +18,7 @@
# rc.apparmor by Steve Beattie
#
# /etc/rc.d/rc.apparmor
-APPARMOR_FUNCTIONS=/lib/apparmor/rc.apparmor.functions
+APPARMOR_FUNCTIONS=/usr/libexec/rc.apparmor.functions

aa_action() {
STRING=$1

0 comments on commit cde70a0

Please sign in to comment.