~ubuntu-branches/ubuntu/dapper/selinux-policy-default/dapper

« back to all changes in this revision

Viewing changes to domains/program/unused/mysqld.te

  • Committer: Bazaar Package Importer
  • Author(s): Russell Coker
  • Date: 2004-06-10 18:08:00 UTC
  • Revision ID: james.westby@ubuntu.com-20040610180800-gagxr0cdovi7mv2i
Tags: upstream-1.12
ImportĀ upstreamĀ versionĀ 1.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#DESC Mysqld - Database server
 
2
#
 
3
# Author:  Russell Coker <russell@coker.com.au>
 
4
# X-Debian-Packages: mysql-server
 
5
#
 
6
 
 
7
#################################
 
8
#
 
9
# Rules for the mysqld_t domain.
 
10
#
 
11
# mysqld_exec_t is the type of the mysqld executable.
 
12
#
 
13
daemon_domain(mysqld)
 
14
 
 
15
allow mysqld_t mysqld_var_run_t:sock_file create_file_perms;
 
16
 
 
17
etcdir_domain(mysqld)
 
18
typealias mysqld_etc_t alias etc_mysqld_t;
 
19
type mysqld_db_t, file_type, sysadmfile;
 
20
 
 
21
log_domain(mysqld)
 
22
 
 
23
allow mysqld_t tmp_t:dir { getattr read };
 
24
 
 
25
allow mysqld_t usr_t:file { getattr read };
 
26
 
 
27
allow mysqld_t self:fifo_file { read write };
 
28
allow mysqld_t self:unix_stream_socket create_stream_socket_perms;
 
29
allow initrc_t mysqld_t:unix_stream_socket { connectto };
 
30
allow initrc_t mysqld_var_run_t:sock_file write;
 
31
 
 
32
allow initrc_t mysqld_log_t:file { write append setattr ioctl };
 
33
 
 
34
allow mysqld_t self:capability { setgid setuid };
 
35
allow mysqld_t self:process getsched;
 
36
 
 
37
allow mysqld_t proc_t:file { getattr read };
 
38
 
 
39
# Allow access to the mysqld databases
 
40
create_dir_file(mysqld_t, mysqld_db_t)
 
41
allow mysqld_t var_lib_t:dir search;
 
42
 
 
43
can_network(mysqld_t)
 
44
 
 
45
# read config files
 
46
r_dir_file(initrc_t, mysqld_etc_t)
 
47
allow mysqld_t { etc_t etc_runtime_t }:{ file lnk_file } { read getattr };
 
48
 
 
49
allow mysqld_t etc_t:dir search;
 
50
 
 
51
allow mysqld_t sysctl_kernel_t:dir search;
 
52
allow mysqld_t sysctl_kernel_t:file read;
 
53
 
 
54
can_unix_connect(sysadm_t, mysqld_t)
 
55
 
 
56
# for /root/.my.cnf - should not be needed
 
57
allow mysqld_t sysadm_home_dir_t:dir search;
 
58
allow mysqld_t sysadm_home_t:file { read getattr };
 
59
 
 
60
ifdef(`logrotate.te', `
 
61
r_dir_file(logrotate_t, mysqld_etc_t)
 
62
allow logrotate_t mysqld_db_t:dir search;
 
63
allow logrotate_t mysqld_var_run_t:dir search;
 
64
allow logrotate_t mysqld_var_run_t:sock_file write;
 
65
can_unix_connect(logrotate_t, mysqld_t)
 
66
')
 
67