Use shibboleth-sp as package name for compatibility.
[shibboleth/cpp-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 port_type:tcp_socket name_connect;
16 allow shibshar_t etc_t:file r_file_perms;
17 allow shibshar_t bin_t:dir r_dir_perms;
18 allow shibshar_t bin_t:file rx_file_perms;
19 allow shibshar_t var_log_t:dir rw_dir_perms;
20 allow shibshar_t var_log_t:file rw_file_perms;
21 allow shibshar_t var_log_t:file { create };
22
23 allow shibshar_t shibshar_t:unix_stream_socket create_stream_socket_perms;
24 allow shibshar_t shibshar_t:netlink_route_socket { create bind getattr};
25 allow shibshar_t usr_t:dir r_dir_perms;
26 allow shibshar_t usr_t:file rx_file_perms;
27
28 allow shibshar_t urandom_device_t:chr_file { getattr ioctl read };
29  
30 # Enable HTTPD to connect to the shib-shar socket and read/write to it
31 can_unix_connect(httpd_t, shibshar_var_run_t)
32 allow httpd_t shibshar_var_run_t:sock_file { write };
33 allow httpd_t shibshar_t:unix_stream_socket { connectto };