aboutsummaryrefslogtreecommitdiffstats
path: root/testing/apparmor/0008-Fix-profile-loading-in-busybox.patch
blob: 37d5f12a812503ae340b82e646019113533d4eb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 2a6a482eac7c6290d2e4349ff4bae1b9a749497f Mon Sep 17 00:00:00 2001
From: allgdante <allan.garret@gmail.com>
Date: Sun, 22 Mar 2020 17:30:20 +0000
Subject: [PATCH 08/12] Fix profile loading in busybox

Just apply the patch present in
https://gitlab.com/apparmor/apparmor/-/issues/80
---
 parser/rc.apparmor.functions | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parser/rc.apparmor.functions b/parser/rc.apparmor.functions
index 22e8367f..8c1c57c5 100644
--- a/parser/rc.apparmor.functions
+++ b/parser/rc.apparmor.functions
@@ -140,7 +140,7 @@ force_complain() {
 	local profile=$1
 
 	# if profile not in complain mode
-	if ! egrep -q "^/.*[ \t]+flags[ \t]*=[ \t]*\([ \t]*complain[ \t]*\)[ \t]+{" $profile ; then
+	if ! egrep -q '^/.*[ \t]+flags[ \t]*=[ \t]*\([ \t]*complain[ \t]*\)[ \t]+\{' $profile ; then
 		local link="${PROFILE_DIR}/force-complain/`basename ${profile}`"
 		if [ -e "$link" ] ; then
 			aa_log_warning_msg "found $link, forcing complain mode"
-- 
2.25.2