32c766cece5317d9801e76f96e0dc5fc8d67732d
[shibboleth/sp.git] / selinux / shibshar.te
1 # Shibboleth SHAR
2
3 # Define the shibshar daemon.
4 daemon_domain(shibshar)
5
6 # Transition the shar socket to the shibshar_var_run_t type
7 # when the shar creates it
8 file_type_auto_trans(shibshar_t, var_run_t, shibshar_var_run_t, sock_file)
9
10 # Enable the shar to work
11 can_exec(shibshar_t, shibshar_exec_t)
12 uses_shlib(shibshar_t)
13 can_network(shibshar_t)
14 can_tcp_connect(shibshar_t, unconfined_t)
15 allow shibshar_t etc_t:file r_file_perms;
16 allow shibshar_t bin_t:dir r_dir_perms;
17 allow shibshar_t bin_t:file rx_file_perms;
18 allow shibshar_t var_log_t:dir rw_dir_perms;
19 allow shibshar_t var_log_t:file rw_file_perms;
20 allow shibshar_t var_log_t:file { create };
21
22 allow shibshar_t shibshar_t:unix_stream_socket create_stream_socket_perms;
23 allow shibshar_t shibshar_t:netlink_route_socket { create bind };
24
25 # Enable HTTPD to connect to the shib-shar socket and read/write to it
26 can_unix_connect(httpd_t, shibshar_var_run_t)
27 allow httpd_t shibshar_var_run_t:sock_file { write };
28 allow httpd_t shibshar_t:unix_stream_socket { connectto };
29