~ubuntu-branches/ubuntu/natty/refpolicy-ubuntu/natty

« back to all changes in this revision

Viewing changes to policy/modules/services/mysql.if

  • Committer: Bazaar Package Importer
  • Author(s): Caleb Case
  • Date: 2009-10-19 01:48:39 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20091019014839-0rpi67ygkrjya30k
Tags: 0.2.20090730-0ubuntu1
* Updated to upstream release 2.20090730
* Handle Upstart direct execution of daemons.
* Pre-depend on selinux to ensure that the trigger is handled (LP: #434084).

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
        allow $1 mysqld_db_t:dir manage_dir_perms;
141
141
')
142
142
 
 
143
#######################################
 
144
## <summary>
 
145
##      Append to the MySQL database directory.
 
146
## </summary>
 
147
## <param name="domain">
 
148
##      <summary>
 
149
##      Domain allowed access.
 
150
##      </summary>
 
151
## </param>
 
152
#
 
153
interface(`mysql_append_db_files',`
 
154
        gen_require(`
 
155
                type mysqld_db_t;
 
156
        ')
 
157
 
 
158
        files_search_var_lib($1)
 
159
        append_files_pattern($1, mysqld_db_t, mysqld_db_t)
 
160
')
 
161
 
 
162
#######################################
 
163
## <summary>
 
164
##      Read and write to the MySQL database directory.
 
165
## </summary>
 
166
## <param name="domain">
 
167
##      <summary>
 
168
##      Domain allowed access.
 
169
##      </summary>
 
170
## </param>
 
171
#
 
172
interface(`mysql_rw_db_files',`
 
173
        gen_require(`
 
174
                type mysqld_db_t;
 
175
        ')
 
176
 
 
177
        files_search_var_lib($1)
 
178
        rw_files_pattern($1, mysqld_db_t, mysqld_db_t)
 
179
')
 
180
 
 
181
#######################################
 
182
## <summary>
 
183
##      Create, read, write, and delete MySQL database files.
 
184
## </summary>
 
185
## <param name="domain">
 
186
##      <summary>
 
187
##      Domain allowed access.
 
188
##      </summary>
 
189
## </param>
 
190
#
 
191
interface(`mysql_manage_db_files',`
 
192
        gen_require(`
 
193
                type mysqld_db_t;
 
194
        ')
 
195
 
 
196
        files_search_var_lib($1)
 
197
        manage_files_pattern($1, mysqld_db_t, mysqld_db_t)
 
198
')
 
199
 
143
200
########################################
144
201
## <summary>
145
202
##      Read and write to the MySQL database
180
237
        allow $1 mysqld_log_t:file { write_file_perms setattr };
181
238
')
182
239
 
 
240
#####################################
 
241
## <summary>
 
242
##      Search MySQL PID files.
 
243
## </summary>
 
244
## <param name="domain">
 
245
##      <summary>
 
246
##      Domain allowed access.
 
247
##      </summary>
 
248
## </param>
 
249
##
 
250
#
 
251
interface(`mysql_search_pid_files',`
 
252
        gen_require(`
 
253
                type mysqld_var_run_t;
 
254
        ')
 
255
 
 
256
        search_dirs_pattern($1, mysqld_var_run_t, mysqld_var_run_t)
 
257
')
 
258
 
183
259
########################################
184
260
## <summary>
185
261
##      All of the rules required to administrate an mysql environment