aboutsummaryrefslogtreecommitdiff
blob: 5b8a540a2253432fb0c1e3a658ac8e260f3e7d1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
policy_module(dbadm)

########################################
#
# Declarations
#

## <desc>
##	<p>
##	Determine whether dbadm can manage
##	generic user files.
##	</p>
## </desc>
gen_tunable(dbadm_manage_user_files, false)

## <desc>
##	<p>
##	Determine whether dbadm can read
##	generic user files.
##	</p>
## </desc>
gen_tunable(dbadm_read_user_files, false)

role dbadm_r;

userdom_base_user_template(dbadm)

########################################
#
# Local policy
#

allow dbadm_t self:capability { dac_override dac_read_search sys_ptrace };

files_dontaudit_search_all_dirs(dbadm_t)
files_delete_generic_locks(dbadm_t)
files_list_var(dbadm_t)

selinux_get_enforce_mode(dbadm_t)

logging_send_syslog_msg(dbadm_t)

userdom_dontaudit_search_user_home_dirs(dbadm_t)

tunable_policy(`dbadm_manage_user_files',`
	userdom_manage_user_home_content_files(dbadm_t)
	userdom_read_user_tmp_files(dbadm_t)
	userdom_write_user_tmp_files(dbadm_t)
')

tunable_policy(`dbadm_read_user_files',`
	userdom_read_user_home_content_files(dbadm_t)
	userdom_read_user_tmp_files(dbadm_t)
')

optional_policy(`
	dbus_role_template(dbadm, dbadm_r, dbadm_t)
')

optional_policy(`
	mysql_admin(dbadm_t, dbadm_r)
')

optional_policy(`
	postgresql_admin(dbadm_t, dbadm_r)
')