The AppArmor user space development project.
Find a file
John Johansen 837f47c921 This is the user space fix for launchpad.net/busgs/599450
It changes the table resizing so that there is always sufficient
high entries in the table, preventing bounds violations from
occurring.

Previously the resize allocation was always based on the character
set range for a state, which could be more or less than actually
required, and packing would waste some space when over allocation
was done.

As a result this patch in general results in slightly smaller
transition tables even though it enforcing the minimum required
padding to avoid bounds violations.
2010-07-23 04:30:31 +02:00
changehat clear remaining $Id$ tags, since bzr does not suppor them 2009-11-11 10:44:26 -08:00
common Bump versioning to AppArmor 2.5 2010-03-10 23:07:29 -08:00
deprecated/management Deprecate old management applications that are no longer supported and 2010-02-04 14:39:27 -08:00
kernel-patches Fix leak when AppArmor encounters a deleted file 2009-02-15 02:38:53 +00:00
libraries/libapparmor Fix perl swig bindings so that libapparmor can be built when configured 2010-03-16 15:00:26 -07:00
parser This is the user space fix for launchpad.net/busgs/599450 2010-07-23 04:30:31 +02:00
profiles abstractions/dbus-session: use Pix instead of Ux for dbus-launch since in 2010-06-22 11:50:31 -05:00
tests First, readlink is in /bin/ on ubuntu, not /usr/bin - checked both 2010-04-27 02:37:30 -07:00
utils apparmor_notify: 2010-05-27 09:08:12 -05:00
.bzrignore add generated files from parser/ to ignore list 2010-06-04 18:39:20 -07:00
LICENSE Add a top-level "catch-all" GPLv2 license to cover any files that are 2007-03-30 15:47:14 +00:00
Makefile Vaguely make the toplevel target 'make tarball' work. It's good (if 2007-08-16 22:11:01 +00:00
README Minor touchups to the README. 2010-07-22 17:07:10 +02:00

------------
Introduction
------------
AppArmor protects systems from insecure or untrusted processes by
running them in restricted confinement, while still allowing processes
to share files, exercise privilege and communicate with other processes.
AppArmor is a Mandatory Access Control (MAC) mechanism which uses the
Linux Security Module (LSM) framework. The confinement's restrictions
are mandatory and are not bound to identity, group membership, or object
ownership. The protections provided are in addition to the kernel's
regular access control mechanisms (including DAC) and can be used to
restrict the superuser.

The AppArmor kernel module and accompanying user-space tools are
available under the GPL license (the exception is the libapparmor
library, available under the LGPL license, which allows change_hat(2)
and change_profile(2) to be used by non-GPL binaries).

For more information, you can read the techdoc.pdf (available after
building the parser) and http://apparmor.wiki.kernel.org.


-------------
Source Layout
-------------

AppArmor consists of several different parts:

changehat/	source for using changehat with Apache, PAM and Tomcat
common/		common makefile rules
desktop/	empty
kernel-patches/	patches for various kernel versions
libraries/	libapparmor source and language bindings
parser/		source for parser/loader and corresponding documentation
profiles/	configuration files, reference profiles and abstractions
tests/		regression and stress testsuites
utils/		high-level utilities for working with AppArmor


------------------------------------------
Building and Installing AppArmor Userspace
------------------------------------------

To build and install AppArmor userspace on your system, build and install in
the following order.


libapparmor:
$ cd ./libraries/libapparmor
$ sh ./autogen.sh
$ sh ./configure --prefix=/usr --with-perl
$ make
$ make check


Utilities:
$ cd utils
$ make
$ make install


parser:
$ cd parser
$ make
$ make tests	# not strictly necessary as they are run during the
		# build by default
$ make install


Apache mod_apparmor:
$ cd changehat/mod_apparmor
$ LIBS="-lapparmor" make
$ make install


PAM AppArmor:
$ cd changehat/pam_apparmor
$ LIBS="-lapparmor -lpam" make
$ make install


Profiles:
$ cd profiles
$ make
$ make install



-------------------
AppArmor Testsuites
-------------------

A number of testsuites are in the AppArmor sources. Most have documentation on
usage and how to update and add tests. Below is a quick overview of their
location and how to run them.


Regression tests
----------------
For details on structure and adding tests, see
tests/regression/subdomain/README.

To run:
$ cd tests/regression/subdomain (requires root)
$ make
$ sudo make tests
$ sudo bash open.sh -r	 # runs and saves the last testcase from open.sh


Parser tests
------------
For details on structure and adding tests, see parser/tst/README.

To run:
$ cd parser/tst
$ make
$ make tests


Libapparmor
-----------
For detail son structure and adding tests, see libraries/libapparmor/README.
$ cd libraries/libapparmor
$ make check


Stress Tests
------------
To run subdomain stress tests:
$ make all

Use these:
$ ./change_hat
$ ./child
$ ./kill.sh
$ ./open
$ ./s.sh

Or run all at once:
$ ./stress.sh

Please note that the above will stress the system so much it may end up
invoking the OOM killer.

To run parser stress tests (requires /usr/bin/ruby):
$ ./stress.sh

(see stress.sh -h for options)

-----------------------------------------------
Building and Installing AppArmor Kernel Patches
-----------------------------------------------

TODO