mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
fix profile unloading, and make it faster by skipping the parser and going
directly to the unload interface. This means that the init script will no longer run on very old versions of AppArmor (pre 2.0)
This commit is contained in:
@@ -374,10 +374,7 @@ remove_profiles() {
|
||||
|
||||
retval=0
|
||||
sed -e "s/ (\(enforce\|complain\))$//" "$SFS_MOUNTPOINT/profiles" | while read profile ; do
|
||||
if ( echo "${profile}" | grep -q "^/" ] ; then
|
||||
profile="profile_$profile";
|
||||
fi
|
||||
echo "\"$profile\" { }" | $PARSER -R >/dev/null
|
||||
echo -n "$profile" > "$SFS_MOUNTPOINT/.remove"
|
||||
rc=$?
|
||||
if [ ${rc} -ne 0 ] ; then
|
||||
retval=${rc}
|
||||
|
Reference in New Issue
Block a user