aboutsummaryrefslogtreecommitdiff
blob: 6fc9e8c69ea4994b90e5da225fe271608309e452 (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
policy_module(fetchmail, 1.19.0)

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

type fetchmail_t;
type fetchmail_exec_t;
init_daemon_domain(fetchmail_t, fetchmail_exec_t)
application_executable_file(fetchmail_exec_t)

type fetchmail_initrc_exec_t;
init_script_file(fetchmail_initrc_exec_t)

type fetchmail_etc_t;
files_config_file(fetchmail_etc_t)

type fetchmail_home_t;
userdom_user_home_content(fetchmail_home_t)

type fetchmail_log_t;
logging_log_file(fetchmail_log_t)

type fetchmail_runtime_t alias fetchmail_var_run_t;
files_pid_file(fetchmail_runtime_t)

type fetchmail_uidl_cache_t;
files_type(fetchmail_uidl_cache_t)

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

dontaudit fetchmail_t self:capability sys_tty_config;
allow fetchmail_t self:process { signal_perms setrlimit };
allow fetchmail_t self:unix_stream_socket { accept listen };

allow fetchmail_t fetchmail_etc_t:file read_file_perms;

read_files_pattern(fetchmail_t, fetchmail_home_t, fetchmail_home_t)

manage_dirs_pattern(fetchmail_t, fetchmail_log_t, fetchmail_log_t)
append_files_pattern(fetchmail_t, fetchmail_log_t, fetchmail_log_t)
create_files_pattern(fetchmail_t, fetchmail_log_t, fetchmail_log_t)
setattr_files_pattern(fetchmail_t, fetchmail_log_t, fetchmail_log_t)
logging_log_filetrans(fetchmail_t, fetchmail_log_t, { dir file })

allow fetchmail_t fetchmail_uidl_cache_t:dir manage_dir_perms;
allow fetchmail_t fetchmail_uidl_cache_t:file manage_file_perms;
mta_spool_filetrans(fetchmail_t, fetchmail_uidl_cache_t, file)

manage_dirs_pattern(fetchmail_t, fetchmail_runtime_t, fetchmail_runtime_t)
manage_files_pattern(fetchmail_t, fetchmail_runtime_t, fetchmail_runtime_t)
files_pid_filetrans(fetchmail_t, fetchmail_runtime_t, { file dir })

kernel_read_kernel_sysctls(fetchmail_t)
kernel_list_proc(fetchmail_t)
kernel_getattr_proc_files(fetchmail_t)
kernel_read_proc_symlinks(fetchmail_t)
kernel_dontaudit_read_system_state(fetchmail_t)

corecmd_exec_bin(fetchmail_t)
corecmd_exec_shell(fetchmail_t)

corenet_all_recvfrom_netlabel(fetchmail_t)
corenet_tcp_sendrecv_generic_if(fetchmail_t)
corenet_tcp_sendrecv_generic_node(fetchmail_t)

corenet_sendrecv_all_client_packets(fetchmail_t)
corenet_tcp_connect_all_ports(fetchmail_t)

dev_read_sysfs(fetchmail_t)
dev_read_rand(fetchmail_t)
dev_read_urand(fetchmail_t)

files_read_etc_runtime_files(fetchmail_t)
files_read_usr_files(fetchmail_t)
files_search_tmp(fetchmail_t)
files_dontaudit_search_home(fetchmail_t)

fs_getattr_all_fs(fetchmail_t)
fs_search_auto_mountpoints(fetchmail_t)

domain_use_interactive_fds(fetchmail_t)

auth_use_nsswitch(fetchmail_t)

logging_send_syslog_msg(fetchmail_t)

miscfiles_read_localization(fetchmail_t)
miscfiles_read_generic_certs(fetchmail_t)

userdom_dontaudit_use_unpriv_user_fds(fetchmail_t)
userdom_search_user_home_dirs(fetchmail_t)

optional_policy(`
	procmail_domtrans(fetchmail_t)
')

optional_policy(`
	sendmail_manage_log(fetchmail_t)
')

optional_policy(`
	seutil_sigchld_newrole(fetchmail_t)
')

optional_policy(`
	udev_read_db(fetchmail_t)
')