Robert Craig | 18b5f87 | 2013-01-07 09:21:18 -0500 | [diff] [blame] | 1 | # IKE key management daemon |
| 2 | type racoon, domain; |
Robert Craig | 18b5f87 | 2013-01-07 09:21:18 -0500 | [diff] [blame] | 3 | type racoon_exec, exec_type, file_type; |
| 4 | |
Stephen Smalley | 97f7c82 | 2013-10-29 14:42:38 -0400 | [diff] [blame] | 5 | init_daemon_domain(racoon) |
| 6 | typeattribute racoon mlstrustedsubject; |
| 7 | |
Stephen Smalley | 1601132 | 2014-02-24 15:06:11 -0500 | [diff] [blame] | 8 | net_domain(racoon) |
| 9 | |
Stephen Smalley | 28afdd9 | 2014-02-26 16:46:33 -0500 | [diff] [blame] | 10 | binder_use(racoon) |
Stephen Smalley | 97f7c82 | 2013-10-29 14:42:38 -0400 | [diff] [blame] | 11 | |
| 12 | allow racoon tun_device:chr_file r_file_perms; |
| 13 | allow racoon cgroup:dir { add_name create }; |
| 14 | allow racoon kernel:system module_request; |
Stephen Smalley | 97f7c82 | 2013-10-29 14:42:38 -0400 | [diff] [blame] | 15 | |
Stephen Smalley | 1601132 | 2014-02-24 15:06:11 -0500 | [diff] [blame] | 16 | allow racoon self:key_socket create_socket_perms; |
| 17 | allow racoon self:tun_socket create_socket_perms; |
Stephen Smalley | 97f7c82 | 2013-10-29 14:42:38 -0400 | [diff] [blame] | 18 | allow racoon self:capability { net_admin net_bind_service net_raw setuid }; |
| 19 | |
| 20 | # XXX: should we give ip-up-vpn its own label (currently racoon domain) |
| 21 | allow racoon system_file:file rx_file_perms; |
| 22 | allow racoon vpn_data_file:file create_file_perms; |
| 23 | allow racoon vpn_data_file:dir w_dir_perms; |
Riley Spahn | 1196d2a | 2014-06-17 14:58:52 -0700 | [diff] [blame] | 24 | |
| 25 | use_keystore(racoon) |
| 26 | |
| 27 | # Racoon (VPN) has a restricted set of permissions from the default. |
| 28 | allow racoon keystore:keystore_key { |
| 29 | get |
| 30 | sign |
| 31 | verify |
| 32 | }; |