summaryrefslogtreecommitdiff
path: root/development/apparmor-debugging.mdwn
blob: 8cf1a50c8d5919178d6236392e52e4c2c18ed4fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Apparmor Debugging

First look at the processes profile and skim the [query language][2].

## Tracking denials

Turn on complain mode

    aa-complain <profile>

This does not track [denials][1]. So do a

	apparmor_parser -pq /etc/apparmor.d/the.profile.to.check

and check for denails, turn them into "audit deny" for debugging.

## Check environment scrubbing

    echo 1 > /sys/module/apparmor/parameters/debugging

## Turn off deny audit quieting

    echo -n noquiet >/sys/module/apparmor/parameters/audit

## Other things to watch out for

* Process environments are usually cleared. So if a confined process spawns
  a subprocess that relies on environments vars this might trigger problems

## Other knobs to try

    echo 1 > /sys/module/apparmor/parameters/debug
	echo -n noquiet >/sys/module/apparmor/parameters/audit

See [826218][] for details.

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826218
[2]: http://wiki.apparmor.net/index.php/QuickProfileLanguage

[826218]: http://bugs.debian.org/826218