File apparmor-parser-removal-whitespace-fix of Package apparmor-parser

From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-parser: Fix handling of removing profiles with whitespace
References: bnc#510740

 The loop that iterates over the profile list doesn't properly handle
 whitespace in the profile name.

 This patch properly handles it line-by-line instead of using whitespace
 as a separator.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 rc.apparmor.functions |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/rc.apparmor.functions
+++ b/rc.apparmor.functions
@@ -378,7 +378,7 @@ remove_profiles() {
 	#them so stor to tmp first
 	MODULE_PLIST=$(mktemp ${APPARMOR_TMPDIR}/tmp.XXXXXXXX)
 	sed -e "s/ (\(enforce\|complain\))$//" "$SFS_MOUNTPOINT/profiles" | sort >"$MODULE_PLIST"
-	cat "$MODULE_PLIST" | while read profile ; do
+	cat "$MODULE_PLIST" | while IFS= read profile ; do
 		echo -n "$profile" > "$SFS_MOUNTPOINT/.remove"
 		rc=$?
 		if [ ${rc} -ne 0 ] ; then