[apparmor] [patch] Fix init script filtering of hats

Steve Beattie steve at nxnw.org
Tue May 31 20:30:17 UTC 2011


Bug: https://bugs.launchpad.net/apparmor/+bug/788616

This patch fixes the init scripts helper functions file to
filter out the hat/child process separator as currently used
by the parser, '//' rather than what used to be used, the '^'
symbol. This fixes bugs where profiles that covered regexs (e.g.
'/usr/lib/firefox-4.0.1/firefox{,*[^s][^h]}') and thus were being
improperly filtered away and unloaded when reloading apparmor policy.

This patch is nominated for trunk and apparmor 2.6.2.
---
 parser/rc.apparmor.functions |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/parser/rc.apparmor.functions
===================================================================
--- a/parser/rc.apparmor.functions
+++ b/parser/rc.apparmor.functions
@@ -235,7 +235,7 @@ profiles_names_list() {
 
 	for profile in $PROFILE_DIR/*; do
 	        if skip_profile "${profile}" && [ -f "${profile}" ] ; then
-			LIST_ADD=$($PARSER $ABSTRACTIONS -N "$profile" | grep -v '\^')
+			LIST_ADD=$($PARSER $ABSTRACTIONS -N "$profile" | grep -v '//')
 			if [ $? -eq 0 ]; then
 				echo "$LIST_ADD" >>$TMPFILE
 			fi
-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20110531/43dbd078/attachment.pgp>


More information about the AppArmor mailing list