Package: apparmor / 2.13.4-3

lp1824812.patch Patch series | download
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
From: Jamie Strandboge <jamie@canonical.com>
Date: Mon, 25 May 2020 08:11:06 +0000
Subject: set SFS_MOUNTPOINT in is_container_with_internal_policy() since it

Bug: https://launchpad.net/bugs/1824812
Forwarded: yes

is sometimes called before is_apparmor_loaded()
---
 parser/rc.apparmor.functions | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/parser/rc.apparmor.functions b/parser/rc.apparmor.functions
index 73f6a84..3e35aeb 100644
--- a/parser/rc.apparmor.functions
+++ b/parser/rc.apparmor.functions
@@ -80,6 +80,9 @@ is_apparmor_present() {
 # process should continue without any loss of functionality. This is an
 # unsupported configuration that cannot be properly handled by this function.
 is_container_with_internal_policy() {
+	# this function is sometimes called independently of
+	# is_apparmor_loaded(), so define this here.
+	SFS_MOUNTPOINT="${SECURITYFS}/${MODULE}"
 	local ns_stacked_path="${SFS_MOUNTPOINT}/.ns_stacked"
 	local ns_name_path="${SFS_MOUNTPOINT}/.ns_name"
 	local ns_stacked