aboutsummaryrefslogtreecommitdiff
blob: bf5efbff1194ecc03da9d52a61b90c28cc0a0c48 (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(resmgr, 1.2.0)

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

type resmgrd_t;
type resmgrd_exec_t;
init_daemon_domain(resmgrd_t, resmgrd_exec_t)

type resmgrd_etc_t;
files_config_file(resmgrd_etc_t)

type resmgrd_var_run_t;
files_pid_file(resmgrd_var_run_t)

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

allow resmgrd_t self:capability { dac_override sys_admin sys_rawio };
dontaudit resmgrd_t self:capability sys_tty_config;
allow resmgrd_t self:process signal_perms;

allow resmgrd_t resmgrd_etc_t:file read_file_perms;
files_search_etc(resmgrd_t)

allow resmgrd_t resmgrd_var_run_t:file manage_file_perms;
allow resmgrd_t resmgrd_var_run_t:sock_file manage_sock_file_perms;
files_pid_filetrans(resmgrd_t, resmgrd_var_run_t, { file sock_file })

kernel_list_proc(resmgrd_t)
kernel_read_proc_symlinks(resmgrd_t)
kernel_read_kernel_sysctls(resmgrd_t)

dev_read_sysfs(resmgrd_t)
dev_getattr_scanner_dev(resmgrd_t)

domain_use_interactive_fds(resmgrd_t)

files_read_etc_files(resmgrd_t)

fs_search_auto_mountpoints(resmgrd_t)

storage_dontaudit_read_fixed_disk(resmgrd_t)
storage_read_scsi_generic(resmgrd_t)
storage_raw_read_removable_device(resmgrd_t)
# not sure if it needs write access, needs to be investigated further...
storage_write_scsi_generic(resmgrd_t)
storage_raw_write_removable_device(resmgrd_t)

logging_send_syslog_msg(resmgrd_t)

miscfiles_read_localization(resmgrd_t)

userdom_dontaudit_use_unpriv_user_fds(resmgrd_t)

optional_policy(`
	seutil_sigchld_newrole(resmgrd_t)
')

optional_policy(`
	udev_read_db(resmgrd_t)
')