[apparmor] [PATCH] update regression tests to work with 2.6.36 kernel

Steve Beattie steve at nxnw.org
Thu Aug 26 18:30:58 BST 2010


On Thu, Aug 26, 2010 at 09:36:31AM -0700, John Johansen wrote:
> The upstream 2.6.36 kernel is missing the /sys/kernel/security/apparmor/profiles file, so introspection of which profiles are loaded is not possible.
> Make testing of profiles loaded conditional on introspection being present.
> 

> === modified file 'tests/regression/apparmor/prologue.inc'
> --- tests/regression/apparmor/prologue.inc	2010-08-10 13:24:41 +0000
> +++ tests/regression/apparmor/prologue.inc	2010-08-26 16:33:25 +0000
> @@ -494,15 +494,17 @@
>  		loadprofile
>  	fi
>  
> -	#check to see if the profiles are actually loaded
> -	for f in `cat $profilenames` ; do
> -		grep -Eq "^$f"' \([^)]+\)$' ${sys_profiles}
> -		rc=$?
> -		if [ $rc -ne 0 ] ; then
> -			echo "Genprofile failed to load profile \"$f\""
> -			exit 1
> -		fi
> -	done
> +	if [ -e ${sys_profiles} ] ; then
> +		#check to see if the profiles are actually loaded
> +		for f in `cat $profilenames` ; do
> +		    grep -Eq "^$f"' \([^)]+\)$' ${sys_profiles}
> +		    	rc=$?
> +				if [ $rc -ne 0 ] ; then
> +				echo "Genprofile failed to load profile \"$f\""
> +				exit 1
> +				fi
> +				done

Patch looks fine except for some whitespace damage above; please fix
before committing.

> +	fi
>  
>  	rm -f ${profile}.old ${profilenames}.old
>  }
> 


-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/apparmor/attachments/20100826/738be2f9/attachment-0001.pgp 


More information about the AppArmor mailing list