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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
policy_module(uml)
########################################
#
# Declarations
#
attribute_role uml_roles;
type uml_t;
type uml_exec_t; # customizable
userdom_user_application_domain(uml_t, uml_exec_t)
role uml_roles types uml_t;
type uml_ro_t; # customizable
userdom_user_home_content(uml_ro_t)
type uml_rw_t;
userdom_user_home_content(uml_rw_t)
type uml_tmp_t;
userdom_user_tmp_file(uml_tmp_t)
type uml_tmpfs_t;
userdom_user_tmpfs_file(uml_tmpfs_t)
type uml_devpts_t;
term_pty(uml_devpts_t)
ubac_constrained(uml_devpts_t)
type uml_switch_t;
type uml_switch_exec_t;
init_daemon_domain(uml_switch_t, uml_switch_exec_t)
type uml_switch_runtime_t alias uml_swich_var_run_t;
files_runtime_file(uml_switch_runtime_t)
########################################
#
# Local policy
#
allow uml_t self:process signal_perms;
allow uml_t self:fifo_file rw_fifo_file_perms;
allow uml_t self:unix_stream_socket create_stream_socket_perms;
allow uml_t self:tcp_socket { accept listen };
allow uml_t self:tun_socket create;
allow uml_t self:unix_dgram_socket { create_socket_perms sendto };
allow uml_t uml_devpts_t:chr_file { rw_chr_file_perms setattr_chr_file_perms };
term_create_pty(uml_t, uml_devpts_t)
manage_dirs_pattern(uml_t, uml_tmp_t, uml_tmp_t)
manage_files_pattern(uml_t, uml_tmp_t, uml_tmp_t)
files_tmp_filetrans(uml_t, uml_tmp_t, { file dir })
manage_files_pattern(uml_t, uml_tmpfs_t, uml_tmpfs_t)
manage_lnk_files_pattern(uml_t, uml_tmpfs_t, uml_tmpfs_t)
manage_fifo_files_pattern(uml_t, uml_tmpfs_t, uml_tmpfs_t)
manage_sock_files_pattern(uml_t, uml_tmpfs_t, uml_tmpfs_t)
fs_tmpfs_filetrans(uml_t, uml_tmpfs_t, { file lnk_file sock_file fifo_file })
allow uml_t uml_ro_t:dir list_dir_perms;
allow uml_t uml_ro_t:file read_file_perms;
allow uml_t uml_ro_t:lnk_file read_lnk_file_perms;
manage_dirs_pattern(uml_t, uml_rw_t, uml_rw_t)
manage_files_pattern(uml_t, uml_rw_t, uml_rw_t)
manage_lnk_files_pattern(uml_t, uml_rw_t, uml_rw_t)
manage_fifo_files_pattern(uml_t, uml_rw_t, uml_rw_t)
manage_sock_files_pattern(uml_t, uml_rw_t, uml_rw_t)
userdom_user_home_dir_filetrans(uml_t, uml_rw_t, dir, ".uml")
can_exec(uml_t, { uml_exec_t uml_tmp_t uml_tmpfs_t })
kernel_read_system_state(uml_t)
kernel_write_proc_files(uml_t)
corecmd_exec_bin(uml_t)
corenet_all_recvfrom_netlabel(uml_t)
corenet_tcp_sendrecv_generic_if(uml_t)
corenet_tcp_sendrecv_generic_node(uml_t)
corenet_sendrecv_all_client_packets(uml_t)
corenet_tcp_connect_all_ports(uml_t)
corenet_rw_tun_tap_dev(uml_t)
domain_use_interactive_fds(uml_t)
files_dontaudit_read_etc_runtime_files(uml_t)
fs_getattr_all_fs(uml_t)
fs_search_auto_mountpoints(uml_t)
auth_use_nsswitch(uml_t)
init_read_utmp(uml_t)
init_dontaudit_write_utmp(uml_t)
libs_exec_lib_files(uml_t)
userdom_use_user_terminals(uml_t)
userdom_attach_admin_tun_iface(uml_t)
tunable_policy(`use_nfs_home_dirs',`
fs_manage_nfs_dirs(uml_t)
fs_manage_nfs_files(uml_t)
fs_manage_nfs_named_pipes(uml_t)
fs_manage_nfs_symlinks(uml_t)
')
tunable_policy(`use_samba_home_dirs',`
fs_manage_cifs_dirs(uml_t)
fs_manage_cifs_files(uml_t)
fs_manage_cifs_named_pipes(uml_t)
fs_manage_cifs_symlinks(uml_t)
')
optional_policy(`
seutil_use_newrole_fds(uml_t)
')
optional_policy(`
virt_attach_tun_iface(uml_t)
')
########################################
#
# Switch local policy
#
dontaudit uml_switch_t self:capability sys_tty_config;
allow uml_switch_t self:process signal_perms;
allow uml_switch_t self:unix_stream_socket { accept listen };
manage_files_pattern(uml_switch_t, uml_switch_runtime_t, uml_switch_runtime_t)
manage_sock_files_pattern(uml_switch_t, uml_switch_runtime_t, uml_switch_runtime_t)
files_runtime_filetrans(uml_switch_t, uml_switch_runtime_t, file)
kernel_read_kernel_sysctls(uml_switch_t)
kernel_list_proc(uml_switch_t)
kernel_read_proc_symlinks(uml_switch_t)
dev_read_sysfs(uml_switch_t)
domain_use_interactive_fds(uml_switch_t)
fs_getattr_all_fs(uml_switch_t)
fs_search_auto_mountpoints(uml_switch_t)
term_dontaudit_use_console(uml_switch_t)
init_use_fds(uml_switch_t)
init_use_script_ptys(uml_switch_t)
logging_send_syslog_msg(uml_switch_t)
miscfiles_read_localization(uml_switch_t)
userdom_dontaudit_use_unpriv_user_fds(uml_switch_t)
userdom_dontaudit_search_user_home_dirs(uml_switch_t)
optional_policy(`
seutil_sigchld_newrole(uml_switch_t)
')
|