File tree 2 files changed +9
-4
lines changed
packages/app-builder-lib/templates/linux
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " app-builder-lib " : patch
3
+ ---
4
+
5
+ fix: ` after-install.tpl ` : Detect if apparmor is enabled instead of just file-exists check
Original file line number Diff line number Diff line change 36
36
#
37
37
# Unfortunately, at the moment AppArmor doesn't have a good story for backwards compatibility.
38
38
# https://askubuntu.com/questions/1517272/writing-a-backwards-compatible-apparmor-profile
39
- APPARMOR_PROFILE_SOURCE= ' /opt/${sanitizedProductName}/resources/apparmor-profile '
40
- APPARMOR_PROFILE_TARGET =' /etc/apparmor.d/${executable} '
41
- if test -d " /etc/apparmor.d" ; then
39
+ if apparmor_status --enabled > /dev/null 2>&1 ; then
40
+ APPARMOR_PROFILE_SOURCE =' /opt/${sanitizedProductName}/resources/apparmor-profile '
41
+ APPARMOR_PROFILE_TARGET= ' /etc/apparmor.d/${executable} '
42
42
if apparmor_parser --skip-kernel-load --debug " $APPARMOR_PROFILE_SOURCE " > /dev/null 2>&1 ; then
43
43
cp -f " $APPARMOR_PROFILE_SOURCE " " $APPARMOR_PROFILE_TARGET "
44
44
@@ -54,4 +54,4 @@ if test -d "/etc/apparmor.d"; then
54
54
else
55
55
echo " Skipping the installation of the AppArmor profile as this version of AppArmor does not seem to support the bundled profile"
56
56
fi
57
- fi
57
+ fi
You can’t perform that action at this time.
0 commit comments