4
Enter
ls
to view all the AppArmor profiles that are currently installed.
5
Delete the profile with
rm
profilename
.
6
Restart AppArmor by entering
rcapparmor restart
in a terminal window.
4.6 Two Methods of Profiling
Given the syntax for AppArmor profiles in
Chapter 2, Profile Components and Syntax
(page 11), you could create profiles without using the tools. However, the effort involved
would be substantial. To avoid such a hassle, use the AppArmor tools to automate the
creation and refinement of profiles.
There are two ways to approach AppArmor profile creation. Tools are available for
both methods.
Stand-Alone Profiling
A method suitable for profiling small applications that have a finite run time, such
as user client applications like mail clients. For more information, refer to
Sec-
tion 4.6.1, “Stand-Alone Profiling”
(page 54).
Systemic Profiling
A method suitable for profiling large numbers of programs all at once and for
profiling applications that may run for days, weeks, or continuously across reboots,
such as network server applications like Web servers and mail servers. For more
information, refer to
Section 4.6.2, “Systemic Profiling”
(page 54).
Automated profile development becomes more manageable with the AppArmor tools:
1
Decide which profiling method suits your needs.
2
Perform a static analysis. Run either aa-genprof or aa-autodep, depending on the
profiling method chosen.
3
Enable dynamic learning. Activate learning mode for all profiled programs.
Building Profiles from the Command Line
53