diff -urN apparmor-parser-2.0.org/rc.apparmor.functions apparmor-parser-2.0/rc.apparmor.functions
--- apparmor-parser-2.0.org/rc.apparmor.functions 2006-10-12 18:56:46.000000000 +0200
-+++ apparmor-parser-2.0/rc.apparmor.functions 2006-12-12 17:38:38.000000000 +0100
++++ apparmor-parser-2.0/rc.apparmor.functions 2006-12-18 14:47:44.113527250 +0100
@@ -53,7 +53,7 @@
if [ -f "${APPARMOR_CONF}" ] ; then
if [ ! -w "$SFS_MOUNTPOINT/.load" ] ; then
sd_log_failure_msg "Loading AppArmor profiles - failed, Do you have the correct privileges?"
return 4
-@@ -459,7 +461,7 @@
+@@ -449,17 +451,15 @@
+ profiles_names_list ${PNAMES_LIST}
+ MODULE_PLIST=$(mktemp ${APPARMOR_TMPDIR}/tmp.XXXXXXXX)
+ sed -e "s/ (\(enforce\|complain\))$//" "$SFS_MOUNTPOINT/profiles" | sort >"$MODULE_PLIST"
+- #profiles=$(cat $PNAMES_LIST | sort | comm -2 -3 "$MODULE_PLIST" -)
+- #for profile in $profiles ; do
+- IFS=$'\n' && for profile in $(cat $PNAMES_LIST | sort | comm -2 -3 "$MODULE_PLIST" -) ; do
+- echo "\"$profile\" {}" | $PARSER -R >/dev/null
++ cat "$PNAMES_LIST" | sort | comm -2 -3 "$MODULE_PLIST" - | while read profile; do
++ echo "\"$profile\" {}" | $PARSER -R > /dev/null
+ done
+ rm "$MODULE_PLIST"
+ rm "$PNAMES_LIST"
return 0
}
if ! grep -qE "^(subdomain|apparmor)[[:space:]]" /proc/modules ; then
subdomain_start
rc=$?
-@@ -479,7 +481,7 @@
+@@ -479,7 +479,7 @@
return $rc
}
if ! grep -qE "^(subdomain|apparmor)[[:space:]]" /proc/modules ; then
return 1
fi
-@@ -493,7 +495,7 @@
+@@ -493,7 +493,7 @@
return $rc
}
subdomain_kill
load_module "subdomain_debug=1"
mount_subdomainfs
-@@ -501,7 +503,7 @@
+@@ -501,7 +501,7 @@
parse_profiles load
}
if [ "${SUBDOMAIN_ENABLE_OWLSM}" = "yes" -a -f ${SFS_MOUNTPOINT}/control/owlsm ] ; then
# Sigh, the "sh -c" is necessary for the SuSE sd_action
# and it can't be abstracted out as a seperate function, as
-@@ -513,7 +515,7 @@
+@@ -513,7 +513,7 @@
fi
}