2
0
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:
John Johansen
2008-05-29 23:10:27 +00:00
parent 934e00a1de
commit 787cb39f81

View File

@@ -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}