~ubuntu-branches/ubuntu/oneiric/apparmor/oneiric-security

« back to all changes in this revision

Viewing changes to profiles/extras/usr.sbin.httpd2-prefork

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-04-27 10:38:07 UTC
  • mfrom: (5.1.118 natty)
  • Revision ID: james.westby@ubuntu.com-20110427103807-ym3rhwys6o84ith0
Tags: 2.6.1-2
debian/copyright: clarify for some full organization names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: usr.sbin.httpd2-prefork 274 2007-01-03 06:51:17Z seth_arnold $
2
 
# ------------------------------------------------------------------
3
 
#
4
 
#    Copyright (C) 2002-2005 Novell/SUSE
5
 
#
6
 
#    This program is free software; you can redistribute it and/or
7
 
#    modify it under the terms of version 2 of the GNU General Public
8
 
#    License published by the Free Software Foundation.
9
 
#
10
 
# ------------------------------------------------------------------
11
 
# vim:syntax=apparmor
12
 
 
13
 
#include <tunables/global>
14
 
 
15
 
/usr/sbin/httpd2-prefork {
16
 
  #include <abstractions/base>
17
 
  #include <abstractions/consoles>
18
 
  #include <abstractions/kerberosclient>
19
 
  #include <abstractions/nameservice>
20
 
  #include <abstractions/perl>
21
 
 
22
 
  capability kill,
23
 
  capability net_bind_service,
24
 
  capability setgid,
25
 
  capability setuid,
26
 
  capability sys_tty_config,
27
 
 
28
 
  /dev/random r,
29
 
  /etc/apache2/*.conf r,
30
 
  /etc/apache2/magic r,
31
 
  /etc/apache2/mod_perl-startup.pl r,
32
 
  /etc/apache2/ssl.crt/*.crt r,
33
 
  /etc/apache2/ssl.key/*.key r,
34
 
  /etc/apache2/{conf,sysconfig,vhosts}.d r,
35
 
  /etc/apache2/{conf,sysconfig,vhosts}.d/* r,
36
 
  /etc/fstab r,
37
 
  /etc/mime.types r,
38
 
  /etc/mtab r,
39
 
  /etc/odbcinst.ini r,
40
 
  /etc/php.d r,
41
 
  /etc/php.d/** r,
42
 
  /etc/php.ini r,
43
 
  /proc/meminfo r,
44
 
  /proc/sys/kernel/ngroups_max r,
45
 
  /tmp/auth_ldap_cache.sem wl,
46
 
  /tmp/session_mm_apache0.sem wl,
47
 
  /tmp/session_mm_apache2handler0.sem wl,
48
 
  /usr/X11R6/lib64/lib*.so* mr,
49
 
  /usr/X11R6/lib/lib*.so* mr,
50
 
  /usr/apache2/error/* r,
51
 
 
52
 
  /usr/lib64/apache2-leader/{lib,mod_}*.so* mr,
53
 
  /usr/lib64/apache2-metuxmpm/{lib,mod_}*.so* mr,
54
 
  /usr/lib64/apache2-prefork/{lib,mod_}*.so* mr,
55
 
  /usr/lib64/apache2-worker/{lib,mod_}*.so* mr,
56
 
  /usr/lib64/apache2/modules/{lib,mod_}*.so* mr,
57
 
  /usr/lib64/apache2/{lib,mod_}*.so* mr,
58
 
 
59
 
  /usr/lib/apache2-leader/{lib,mod_}*.so* mr,
60
 
  /usr/lib/apache2-metuxmpm/{lib,mod_}*.so* mr,
61
 
  /usr/lib/apache2-prefork/{lib,mod_}*.so* mr,
62
 
  /usr/lib/apache2-worker/{lib,mod_}*.so* mr,
63
 
  /usr/lib/apache2/modules/{lib,mod_}*.so* mr,
64
 
 
65
 
  /usr/lib64/mysql/libmysql*.so* mr,
66
 
  /usr/lib64/php/extensions/*.so mr,
67
 
  /usr/lib64/php4/*.so mr,
68
 
  /usr/lib64/python[12].[0-9]/**.{py,pyc,pth,so} mr,
69
 
  /usr/lib64/python[12].[0-9]/site-packages r,
70
 
  /usr/lib64/qt3/lib/lib*.so* mr,
71
 
 
72
 
  /usr/lib/apache2/{lib,mod_}*.so mr,
73
 
  /usr/lib/mysql/libmysql*.so* mr,
74
 
  /usr/lib/php/extensions/*.so mr,
75
 
  /usr/lib/php4/*.so mr,
76
 
  /usr/lib/python[12].[0-9]/**.{py,pyc,pth,so} mr,
77
 
  /usr/lib/python[12].[0-9]/site-packages r,
78
 
  /usr/lib/qt3/lib/lib*.so* mr,
79
 
 
80
 
  /usr/local/tomcat/conf/mod_jk.conf r,
81
 
  /usr/local/tomcat/conf/workers-ajp12.properties r,
82
 
  /usr/sbin/httpd2-prefork r,
83
 
  /usr/share/apache2/error/* r,
84
 
  /usr/share/apache2/error/include/* r,
85
 
  /usr/share/misc/magic.mime r,
86
 
  /usr/share/snmp/mibs r,
87
 
  /usr/share/snmp/mibs/*.{txt,mib} r,
88
 
  /usr/share/snmp/mibs/.index wr,
89
 
  /usr/share/ssl/openssl.cnf r,
90
 
  /var/lock/httpd2.lock.* wl,
91
 
  /var/log/apache2/* rwl,
92
 
  /var/log/httpd/ssl_scache.dir r,
93
 
  /var/log/httpd/ssl_scache.pag r,
94
 
  /var/run/httpd2.mm.* wl,
95
 
  /var/run/httpd2.pid wl,
96
 
 
97
 
  # Note that mod_perl, mod_php, mod_python, etc, allows in-apache
98
 
  # execution of content regardless of 'x' permissions, as no exec(2)
99
 
  # takes place to perform a domain change.
100
 
 
101
 
  # suexec execution of CGIs will require appropriate permissions
102
 
  /usr/sbin/suexec2 mixr,
103
 
 
104
 
  # Allow logging
105
 
  /var/log/apache2/** rwl,
106
 
 
107
 
  # Allow any CGIs in user directories to run, inheriting the apache
108
 
  # profile: 
109
 
  # /home/*/public_html/**             mixr,
110
 
  # (note that if you are using mod_change_hat, you have a choice of
111
 
  # providing neccesary access in this file OR in URI-specific hats, or
112
 
  # hats in the <VHost>, <Location>, or <Directory> directives. Please
113
 
  # see the user's guide or mod_apparmor(5) for more information.
114
 
 
115
 
  # Allow site-wide CGIs to run, inheriting the apache profile:
116
 
  # /srv/www/cgi-bin/**        mixr,
117
 
  # /var/www/cgi-bin/**        mixr,
118
 
 
119
 
  @{HOME}/public_html                r,
120
 
  @{HOME}/public_html/**             r,
121
 
  # Red Hat locations
122
 
  /var/www/html/**                   r,
123
 
  /var/www/icons/*.{gif,jpg,png}     r,
124
 
  /var/www/error/*                   r,
125
 
  # SuSE locations (LSB?)
126
 
  /srv/www/htdocs                    r,
127
 
  /srv/www/htdocs/**                 r,
128
 
  /srv/www/icons/*.{gif,jpg,png}     r,
129
 
  /srv/www/vhosts                    r,
130
 
  /srv/www/vhosts/**                 r,
131
 
  # SuSE location of the apache manual + error pages
132
 
  /usr/share/apache2/**              r,
133
 
 
134
 
  # php session state
135
 
  /var/lib/php/sess_*                rwl,
136
 
 
137
 
 
138
 
  ^HANDLING_UNTRUSTED_INPUT {
139
 
    #include <abstractions/nameservice>
140
 
    /var/log/apache2/*     w,
141
 
    /**.htaccess           r,
142
 
  }
143
 
 
144
 
  ^DEFAULT_URI {
145
 
    #include <abstractions/nameservice>
146
 
    #include <abstractions/base>
147
 
 
148
 
    # Note that mod_perl, mod_php, mod_python, etc, allows in-apache
149
 
    # execution of content regardless of 'x' permissions, as no exec(2)
150
 
    # takes place to perform a domain change.
151
 
 
152
 
    # suexec execution of CGIs will require appropriate permissions
153
 
    /usr/sbin/suexec2 mixr,
154
 
 
155
 
    # Allow logging
156
 
    /var/log/apache2/** rwl,
157
 
 
158
 
    # Allow any CGIs in user directories to run, inheriting the apache
159
 
    # profile: 
160
 
    # /home/*/public_html/**             mixr,
161
 
    # (note that if you are using mod_change_hat, you have a choice of
162
 
    # providing neccesary access in this file OR in URI-specific hats, or
163
 
    # hats in the <VHost>, <Location>, or <Directory> directives. Please
164
 
    # see the user's guide or mod_apparmor(5) for more information.
165
 
 
166
 
    # Allow site-wide CGIs to run, inheriting the apache profile:
167
 
    # /srv/www/cgi-bin/**        mixr,
168
 
    # /var/www/cgi-bin/**        mixr,
169
 
 
170
 
    @{HOME}/public_html                r,
171
 
    @{HOME}/public_html/**             r,
172
 
    # Red Hat locations
173
 
    /var/www/html/**                   r,
174
 
    /var/www/icons/*.{gif,jpg,png}     r,
175
 
    /var/www/error/*                   r,
176
 
    # SuSE locations (LSB?)
177
 
    /srv/www/htdocs                    r,
178
 
    /srv/www/htdocs/**                 r,
179
 
    /srv/www/icons/*.{gif,jpg,png}     r,
180
 
    /srv/www/vhosts                    r,
181
 
    /srv/www/vhosts/**                 r,
182
 
    # SuSE location of the apache manual + error pages
183
 
    /usr/share/apache2/**              r,
184
 
 
185
 
    # php session state
186
 
    /var/lib/php/sess_*                rwl,
187
 
  }
188
 
}