
Armor profiles that might or might not be associated with each process. The user can
then decide whether each of these programs needs an AppArmor profile.
If you have new or modified profiles, you can submit them to the apparmor-gener-
[email protected] [
mailto:[email protected]
]
mailing list along with a use case for the application behavior that you exercised. The
AppArmor team reviews and may submit the work into openSUSE. We cannot guarantee
that every profile will be included, but we make a sincere effort to include as much as
possible so that end users can contribute to the security profiles that ship in openSUSE.
1.4.1 Immunizing Web Applications
To find Web applications, investigate your Web server configuration. The Apache Web
server is highly configurable and Web applications can be stored in many directories,
depending on your local configuration. openSUSE, by default, stores Web applications
in
/srv/www/cgi-bin/
. To the maximum extent possible, each Web application
should have an Novell AppArmor profile.
Once you find these programs, you can use the AppArmor Add Profile Wizard to create
profiles for them. Refer to
Section 3.1, “Adding a Profile Using the Wizard”
(page 25).
Because CGI programs are executed by the Apache Web server, the profile for Apache
itself,
usr.sbin.httpd2-prefork
for Apache2 on openSUSE, must be modified
to add execute permissions to each of these programs. For instance, adding the line
/srv/www/cgi-bin/my_hit_counter.pl rpx
grants Apache permission to
execute the Perl script
my_hit_counter.pl
and requires that there be a dedicated
profile for
my_hit_counter.pl
. If
my_hit_counter.pl
does not have a ded-
icated profile associated with it, the rule should say
/srv/www/cgi-bin/my_hit_counter.pl rix
to cause
my_hit_counter
.pl
to inherit the
usr.sbin.httpd2-prefork
profile.
Some users might find it inconvenient to specify execute permission for every CGI
script that Apache might invoke. Instead, the administrator can grant controlled access
to collections of CGI scripts. For instance, adding the line
/srv/www/cgi-bin/*.{pl,py,pyc} rix
allows Apache to execute all files
in
/srv/www/cgi-bin/
ending in
.pl
(Perl scripts) and
.py
or
.pyc
(Python
scripts). As above, the
ix
part of the rule causes Python scripts to inherit the Apache
profile, which is appropriate if you do not want to write individual profiles for each
Python script.
Immunizing Programs
15