apparmor/tests/regression/apparmor
Steve Beattie 1519d46325 tests: fix socketpair tests for added af_unix crosscheck
The new af_unix apparmor kernel patches include the first step towards
implicit labeling. As a result, when a file descriptor is inherited
across one profile boundary to another, both labels' policies are
checked for valid access to the file descriptor. However, due to a quirk
in the linux kernel, when a socket is opened, the file descriptor is
marked as having read and write (aka send and receive) access. When the
crosscheck revalidation occurs, this means that the policy being
inherited from requires read/write access to the socket descriptor, even
if the process never reads or writes to it. This resulted in a few
failures in the socketpair tests.

The following patch adjusts the failing tests to include the neccessary
send and receive permissions, as well as adding additional tests that
are expected to fail when they are not present, to try to ensure that
if our crosscheck behavior changes, we catch it.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: Tyler Hicks <tyhicks@canonical.com>
2014-09-18 12:04:29 -07:00
..
netdomain Rename "subdomain" to "apparmor" in kernel regression tests. 2010-07-26 09:26:26 -07:00
scripts Rename "subdomain" to "apparmor" in kernel regression tests. 2010-07-26 09:26:26 -07:00
TODO Rename "subdomain" to "apparmor" in kernel regression tests. 2010-07-26 09:26:26 -07:00
access.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
access.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
AppArmor.rtf Rename "subdomain" to "apparmor" in kernel regression tests. 2010-07-26 09:26:26 -07:00
capabilities.sh Update test scripts for ptrace rules. 2014-04-23 11:44:41 -07:00
changehat.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
changehat.h tests: Remove remainder of libimmunix and 2.[24] kernel support 2013-11-04 12:25:53 -08:00
changehat.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
changehat_fail.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
changehat_fork.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
changehat_fork.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
changehat_misc.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
changehat_misc.sh Regression testsuite: add the ability to add multiple binaries to a 2012-01-12 12:23:51 +01:00
changehat_misc2.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
changehat_pthread.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
changehat_twice.c Store the aa_change_hat magic token in an unsigned long in the test suite 2014-03-04 10:50:47 -08:00
changehat_wrapper.c Store the aa_change_hat magic token in an unsigned long in the test suite 2014-03-04 10:50:47 -08:00
changeprofile.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
changeprofile.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
chdir.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
chdir.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
chgrp.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
chmod.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
chown.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
clone.c apparmor: Fix clone test on quantal arm omap-4 2012-10-20 01:22:29 -07:00
clone.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
coredump.c The coredump regression test existed in the tree, but was not hooked up to 2010-07-26 10:55:00 -07:00
coredump.sh The apparmor coredump regression test was broken. 2012-10-01 11:05:24 -07:00
dbus.conf tests: Add regression tests for dbus 2013-08-20 12:14:03 -07:00
dbus.inc tests: Update dbus.inc for af_unix mediation 2014-09-10 21:30:29 -05:00
dbus_common.c tests: Add regression tests for dbus 2013-08-20 12:14:03 -07:00
dbus_common.h tests: Add regression tests for dbus 2013-08-20 12:14:03 -07:00
dbus_eavesdrop.c tests: Add regression tests for dbus eavesdrop rules 2013-12-06 11:19:33 -08:00
dbus_eavesdrop.sh tests: Update the regression tests for v6 policy 2014-03-26 21:08:59 -05:00
dbus_message.c tests: Add regression tests for dbus 2013-08-20 12:14:03 -07:00
dbus_message.sh tests: Update the regression tests for v6 policy 2014-03-26 21:08:59 -05:00
dbus_service.c tests: Add regression tests for dbus 2013-08-20 12:14:03 -07:00
dbus_service.sh tests: Update the regression tests for v6 policy 2014-03-26 21:08:59 -05:00
dbus_unrequested_reply.c tests: Add dbus tests for unrequested reply messages 2014-09-05 09:43:05 -05:00
dbus_unrequested_reply.sh tests: Add dbus tests for unrequested reply messages 2014-09-05 09:43:05 -05:00
deleted.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
deleted.sh tests: Update deleted.sh for af_unix mediation 2014-09-10 21:30:20 -05:00
dropprivs_wrapper.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
env_check.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
env_check.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
environ.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
environ.sh Regression testsuite: add the ability to add multiple binaries to a 2012-01-12 12:23:51 +01:00
epilogue.inc Rename "subdomain" to "apparmor" in kernel regression tests. 2010-07-26 09:26:26 -07:00
exec.c Rename "subdomain" to "apparmor" in kernel regression tests. 2010-07-26 09:26:26 -07:00
exec.sh Update test scripts for signal rules 2014-04-23 11:40:56 -07:00
exec_qual.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
exec_qual.sh Update test scripts for new signal and ptrace semantics 2014-04-23 11:46:06 -07:00
exec_qual2.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
fchdir.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
fchdir.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
fchgrp.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
fchmod.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
fchown.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
fd_inheritance.c tests: Verify delegation of fd inheritance 2013-08-08 22:47:25 -07:00
fd_inheritance.sh tests: Verify delegation of fd inheritance 2013-08-08 22:47:25 -07:00
fd_inheritor.c tests: Verify delegation of fd inheritance 2013-08-08 22:47:25 -07:00
fork.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
fork.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
i18n.sh regression tests: adjust for parser escape fixes 2014-06-19 13:54:49 -07:00
introspect.c regression tests: fix introspect.c compiler warnings 2013-12-03 14:18:00 -08:00
introspect.sh Add missing introspection regression test that should have been checked in 2011-08-31 15:58:27 -07:00
link.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
link.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
link_subset.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
link_subset.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
longpath.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
Makefile tests: Add dbus tests for unrequested reply messages 2014-09-05 09:43:05 -05:00
mkdir.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
mkdir.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
mkprofile.pl tests: Update mkprofile.pl to accept unix rules 2014-09-05 09:43:49 -05:00
mmap.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
mmap.sh Update test scripts for new signal and ptrace semantics 2014-04-23 11:46:06 -07:00
mount.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
mount.sh tests: Mount without updating mtab in mount.sh 2014-04-24 14:24:54 -05:00
mult_mount.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
named_pipe.c tests: Add more named pipe tests 2014-06-10 17:29:40 -05:00
named_pipe.sh tests: Add named_pipe tests to only place child process into a hat 2014-06-10 23:05:44 -05:00
net_raw.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
net_raw.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
onexec.c Fix permission mapping for change_profile onexec 2012-03-26 06:11:16 -07:00
onexec.sh Add a small sleep call to the onexec test to give the forked process a 2012-11-30 21:25:23 -08:00
open.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
open.sh Fix permissions attached to the bare file keyword 2012-03-09 04:23:25 -08:00
openat.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
openat.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
owlsm.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
pipe.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
pipe.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
pivot_root.c tests: Add pivot_root tests 2014-04-14 21:48:14 -05:00
pivot_root.sh tests: Add pivot_root tests 2014-04-14 21:48:14 -05:00
prologue.inc tests: Allow profile names that don't match an exec 2014-05-27 09:17:31 +02:00
ptrace.c Rename "subdomain" to "apparmor" in kernel regression tests. 2010-07-26 09:26:26 -07:00
ptrace.sh Update test scripts for ptrace rules. 2014-04-23 11:44:41 -07:00
ptrace_helper.c Rename "subdomain" to "apparmor" in kernel regression tests. 2010-07-26 09:26:26 -07:00
ptrace_v5.inc Update test scripts for ptrace rules. 2014-04-23 11:44:41 -07:00
ptrace_v6.inc Update test scripts for new signal and ptrace semantics 2014-04-23 11:46:06 -07:00
pwrite.c Rename "subdomain" to "apparmor" in kernel regression tests. 2010-07-26 09:26:26 -07:00
pwrite.sh Update test scripts for new signal and ptrace semantics 2014-04-23 11:46:06 -07:00
query_label.c tests: Add aa_query_label() regression tests 2013-09-27 17:33:09 -07:00
query_label.sh tests: Add aa_query_label() regression tests 2013-09-27 17:33:09 -07:00
readdir.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
readdir.sh This patch adds testcases that confirm that using a bare 2012-03-15 16:46:50 -07:00
README tests: Update README to reflect bash requirement 2014-01-12 22:37:39 -06:00
regex.sh Update test scripts for signal rules 2014-04-23 11:40:56 -07:00
rename.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
rename.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
rw.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
rw.sh Update test scripts for new signal and ptrace semantics 2014-04-23 11:46:06 -07:00
sd_flags.sh Regression testsuite: add the ability to add multiple binaries to a 2012-01-12 12:23:51 +01:00
setattr.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
socketpair.c tests: Create socketpair test for checking labeling on fds 2014-05-27 09:19:15 +02:00
socketpair.sh tests: fix socketpair tests for added af_unix crosscheck 2014-09-18 12:04:29 -07:00
strace.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
swap.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
swap.sh regression swap test: 640 KiB not enough swap for everyone 2014-03-20 11:28:51 -07:00
symlink.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
symlink.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall.sh Fixes several warnings, typos, clarifies a subtest description and starts 2010-07-26 10:50:33 -07:00
syscall_chroot.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_ioperm.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_iopl.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_mknod.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_mlockall.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_ptrace.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_query_module.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_reboot.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_setdomainname.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_sethostname.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_setpriority.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_setscheduler.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_sysctl.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
syscall_sysctl.sh regression sysctl: skip if sysctl not available 2014-03-20 11:23:10 -07:00
sysctl_proc.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
tcp.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
tcp.sh tests: Update the regression tests for v6 policy 2014-03-26 21:08:59 -05:00
unix_fd_client.c Rename "subdomain" to "apparmor" in kernel regression tests. 2010-07-26 09:26:26 -07:00
unix_fd_server.c Fixes several warnings, typos, clarifies a subtest description and starts 2010-07-26 10:50:33 -07:00
unix_fd_server.sh tests: Update unix_fd_server.sh for af_unix mediation 2014-09-10 21:30:27 -05:00
unix_socket.c tests: Modify unix_socket/unix_socket_client to accept abstract names 2014-08-11 23:59:17 -05:00
unix_socket.sh tests: Update mkprofile.pl to accept unix rules 2014-09-05 09:43:49 -05:00
unix_socket_client.c tests: Modify unix_socket/unix_socket_client to accept abstract names 2014-08-11 23:59:17 -05:00
unlink.c as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
unlink.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
uservars.inc.source Merge two patches around uservars.* files 2014-03-03 16:03:23 -08:00
uservars.inc.system Merge two patches around uservars.* files 2014-03-03 16:03:23 -08:00
xattrs.c Rename "subdomain" to "apparmor" in kernel regression tests. 2010-07-26 09:26:26 -07:00
xattrs.sh as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00

Running tests
=============

Type "sudo make tests" at the shell prompt, this will make the
subprograms and run the tests.

You must be root to execute "make tests" (a requirement of AppArmor).

(There is also a 'make alltests', which adds a test for bug that, when
triggered, would cause the kernel to crash.)

Test output
===========

By default, no output is displayed for a passing test.  The makefile will
output:
	running <testname> for each test.

To have verbose output with each subtest reporting successes, set the
environment variable VERBOSE=1:
	sudo VERBOSE=1 make tests

There are three typical failure scenarios:
	- Test failed when it was expected to pass
	- Test passed when it was expected to fail
	- Unexpected shell error - the test harness encountered an unexpected
		error.


Changing environment variables
==============================

Common user changeable environment variables are stored in the file
'uservars.inc'.  Currently the path to the tmp directory, the path
to the apparmor_parser executable, and any additional arguments to give
to the parser are specified in this configuration file.

(Note: the tmp directory specified in uservars.inc will have an added
random string appended to it by the mktemp(1) program.)

Debugging test failures
=======================

In the event of a failure run the individual test harness using the -r (or 
-retain) option.  This will not remove the temporary test directory and will 
display it's path.  Inside the directory is a script called 'runtest' which 
will rerun the last failed command. 

Example:

# bash unlink.sh -r
Files retained in: /tmp/sdtest.25406-19681

#ls -l /tmp/sdtest.25406-19681
total 3
-rw-r--r--    1 root     root            0 Jul  2 11:51 file
-rw-r--r--    1 root     root           25 Jul  2 11:51 output.unlink
-rw-r--r--    1 root     root          182 Jul  2 11:51 profile
-rw-r--r--    1 root     root          292 Jul  2 11:51 runtest


Note that the contents of this directory (when -r is specified) is the output
of the final test contained within the controlling test harness, in this case
unlink.sh.   If the harness passed, then output.unlink will contain the output
from the final run of the executable (which may indicate an expected error).
If there was an unexpected error (failed when pass was expected or passed when
failure was expected, or an unexpected test harness error), the controlling 
test harness will abort processing further tests and the contents of the 
directory will contain the files for the failed subtest.

It may be necessary to create certain temp files in this directory in order to 
have the test function correctly, see the AppArmor profile 'profile' in the 
directory in order to determine which files may need to be created to support
the executable.

In order to debug more complicated test failures such as an expected 
shell error (test harness error) it is usually necessary to rerun the test with 
debugging enabled, for example:

# bash -x unlink.sh


Adding new tests
================

The test harness is designed to make adding new tests fairly simply.

Each test consists of one controlling shell script and one or more executable
files.  

The file 'prologue.inc' must be loaded into the shell script.  This file 
contains the controlling logic and supporting shell functions.

By default, prologue.inc assumes the test binary is the same name as the shell
script, with '.sh' removed.  For test scripts with only one executable this 
makes things simple.  You may want to have a single shell script run multiple
executables (syscall.sh for example). In this case, the 'settest' function is
used to select a new binary executable for this test.

The 'genprofile' function generates a profile based on passed arguments.  
The function automatically adds the necessary shared libraries and output 
files necessary to support the execution, it is not necessary to specify 
these manually.  Therefore a call to genprofile without arguments will build 
a profile allowing the executable to run but without any additional access.
Specifying additional arguments to genprofile in the form of <filename>:<perm>
will allow additional access.  

Support for changehat subprofiles is provided by the 'hat:<hatname>'
argument to genprofile. This will create a hat within the profile named
<hatname>. All following rules (file, net, or cap) up to the next "hat:"
argument or the end of the argument list will be included within this hat.

Support for multiple profiles within a single load (for example for
test that want to domain tansition to another profile) is supported by
the "image' argument to genprofile. This keyword preceeded by a '--'
seperator terminates the previous profile and creates a new profile for
the specified executable image.

Together, 'image' and 'hat:' allow complex profiles including subhats and
domain transitions to be specified via a single invocation of genprofile.

[Note: the old "-- subhat=<hatname>" mechanism for specifying hats is
 no longer supported.]

Executing a test is achieved by calling the 'runchecktest' function which
will run either the executable matching the name of the shell script, or 
specified by settest.  The first argument is a brief description of what the
executable does in this mode, which is displayed in the event of an error.
The second argument is either "pass" or "fail" indicating whether the test
is expected to pass or fail.  The executable is expected to output "PASS"
for success and "FAIL: <error message>" in the event of a failure.  If the
executable outputs something other than this, the controlling shell script
will interpret this as a test failure and output "unable to run test sub
executable" and terminate.  Remaining arguments to runchecktest are passed
to the executable as argv[1] .. argv[n].

The runchecktest command executes and checks the test serially.  If a test
requires to be run in the background, so that the shell may do subsequent
operations, such as sending it a signal before checking it's output, this is
accomplished by separately calling 'runtestbg' and 'checktestbg' instead
of calling 'runchecktest'.

Profile loading, replacing and unloading is automatically handled by the 
shell script (via prologue.inc).  Also, cleanup (tempfile removal and 
profile unloading) on exit is automatic.

As an example, the text shell script for exec (exec.sh) is 24 lines and
may be used as a template for creating new simple tests (changehat.sh is
a good template for subprofile tests and rw.sh is a template for tests
requiring signal passing)

	#! /bin/bash
	
	pwd=`dirname $0`
	pwd=`cd $pwd ; pwd`
	
	<bin must be set prior to including prologue.inc. This is the only>
	<requirement placed on the shell script author by prologue.inc>
	bin=$pwd
	
	<prologue.inc must be included before running any tests>
	. $bin/prologue.inc
	
	<variable definitions used by this script?
	file=/bin/true
	okperm=x
	badperm=r
	
	# PASS TEST
	
	<generate a profile allowing x access to /bin/true>
	genprofile $file:$okperm
	
	<run this test (exec) passing /bin/true as argv[1]>
	<check it's output, it is expected to pass>
	runchecktest "EXEC with x" pass $file
	
	# NOLINK PERMTEST
	<generate a new profile allowing only r access to /bin/true>
	<apparmor_parser will automatically be invoked in -r mode>
	genprofile $file:$badperm

	<run this test (exec) passing /bin/true as argv[1]>
	<check it's output, it is expected to FAIL>
	runchecktest "EXEC no x" fail $file

	<Thats it. Exit status $rc is automatically returned by epilogue.inc>

Supporting files
================

strace.sh	Not a test harness, used to support strace testing.
mkprofile.sh	Not a test harness, used to generate AppArmor profiles.
prologue.inc	Must be dotted (included) into the test harness. Provides
		support routines.
epilogue.inc	Cleanup support, automatically called upon successful or
		unsuccessful exit
uservars.inc	Contains variables that may need to be changed per user.

Makefile	Makefile for building or running tests. Use 'make' to build,
		'make tests' to run.

*.sh		Controlling test harness
*.c		Test executable.

Disabled tests
==============

Symlink mediation (symlink.sh) in AppArmor has been disabled.
It is too easy to defeat by creating a relative symlink and subsequently
moving the link.

Current failures
================

1) Changehat_misc

   THIS IS NOT AN ERROR - per se.
   Two killed messages will be output. 
   This is not an error, rather a sign that bash noticed the kernel had killed 
   a process which was attempting to use a bogus MAGIC number.  Alas, there is 
   no way to get bash to not print this diagnostic