aboutsummaryrefslogtreecommitdiff
blob: 9232acd17ae7510c27e04734c0aa74a0f750ccc0 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
policy_module(inn)

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

type innd_t;
type innd_exec_t;
init_daemon_domain(innd_t, innd_exec_t)

type innd_etc_t;
files_config_file(innd_etc_t)

type innd_initrc_exec_t;
init_script_file(innd_initrc_exec_t)

type innd_log_t;
logging_log_file(innd_log_t)

type innd_runtime_t alias innd_var_run_t;
files_runtime_file(innd_runtime_t)

type innd_var_lib_t;
files_type(innd_var_lib_t)

type news_spool_t;
files_mountpoint(news_spool_t)

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

allow innd_t self:capability { dac_override kill setgid setuid };
dontaudit innd_t self:capability sys_tty_config;
allow innd_t self:process { setsched signal_perms };
allow innd_t self:fifo_file rw_fifo_file_perms;
allow innd_t self:unix_dgram_socket sendto;
allow innd_t self:unix_stream_socket { accept connectto listen };
allow innd_t self:tcp_socket { accept listen };

read_files_pattern(innd_t, innd_etc_t, innd_etc_t)
read_lnk_files_pattern(innd_t, innd_etc_t, innd_etc_t)

allow innd_t innd_log_t:dir setattr_dir_perms;
append_files_pattern(innd_t, innd_log_t, innd_log_t)
create_files_pattern(innd_t, innd_log_t, innd_log_t)
setattr_files_pattern(innd_t, innd_log_t, innd_log_t)

manage_dirs_pattern(innd_t, innd_var_lib_t, innd_var_lib_t)
manage_files_pattern(innd_t, innd_var_lib_t, innd_var_lib_t)

manage_dirs_pattern(innd_t, innd_runtime_t, innd_runtime_t)
manage_files_pattern(innd_t, innd_runtime_t, innd_runtime_t)
manage_sock_files_pattern(innd_t, innd_runtime_t, innd_runtime_t)
files_runtime_filetrans(innd_t, innd_runtime_t, file)

manage_dirs_pattern(innd_t, news_spool_t, news_spool_t)
manage_files_pattern(innd_t, news_spool_t, news_spool_t)
manage_lnk_files_pattern(innd_t, news_spool_t, news_spool_t)

can_exec(innd_t, innd_exec_t)

kernel_read_kernel_sysctls(innd_t)
kernel_read_system_state(innd_t)

corenet_all_recvfrom_netlabel(innd_t)
corenet_tcp_sendrecv_generic_if(innd_t)
corenet_tcp_sendrecv_generic_node(innd_t)
corenet_tcp_bind_generic_node(innd_t)

corenet_sendrecv_innd_server_packets(innd_t)
corenet_tcp_bind_innd_port(innd_t)

corenet_sendrecv_all_client_packets(innd_t)
corenet_tcp_connect_all_ports(innd_t)

corecmd_exec_bin(innd_t)
corecmd_exec_shell(innd_t)

dev_read_sysfs(innd_t)
dev_read_urand(innd_t)

domain_use_interactive_fds(innd_t)

fs_getattr_all_fs(innd_t)
fs_search_auto_mountpoints(innd_t)

files_list_spool(innd_t)
files_read_etc_runtime_files(innd_t)
files_read_usr_files(innd_t)

auth_use_nsswitch(innd_t)

logging_send_syslog_msg(innd_t)

miscfiles_read_localization(innd_t)

seutil_dontaudit_search_config(innd_t)

userdom_dontaudit_use_unpriv_user_fds(innd_t)
userdom_dontaudit_search_user_home_dirs(innd_t)

mta_send_mail(innd_t)

ifdef(`distro_gentoo',`
	logging_syslog_managed_log_file(innd_log_t, "news.crit")
	logging_syslog_managed_log_file(innd_log_t, "news.err")
	logging_syslog_managed_log_file(innd_log_t, "news.notice")
')

optional_policy(`
	cron_system_entry(innd_t, innd_exec_t)
')

optional_policy(`
	hostname_exec(innd_t)
')

optional_policy(`
	seutil_sigchld_newrole(innd_t)
')