X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=tf2%2Ftf2.te;h=024594e5b1fd5145ca20b0cbfa81013b73e6a23d;hb=refs%2Fheads%2Fmaster;hp=a33950bafb7a91db264164ae8538e378e0c712c7;hpb=c62e18163afbd2b6df7fb002c873196a4f653e12;p=selinux.git diff --git a/tf2/tf2.te b/tf2/tf2.te index a33950b..024594e 100644 --- a/tf2/tf2.te +++ b/tf2/tf2.te @@ -1,4 +1,9 @@ -policy_module(tf2, 0.1.13) +policy_module(tf2, 0.1.30) + +require { + type default_t; + type games_data_t; +} # File context for the executable process type tf2_t; @@ -12,9 +17,8 @@ files_type(tf2_rw_t) type tf2_ro_t; files_type(tf2_ro_t) -# type tf2_tmp_t; -# files_tmp_file(tf2_tmp_t) +init_domain(tf2_t, tf2_exec_t) init_daemon_domain(tf2_t, tf2_exec_t) allow tf2_t self:process { setsched signal signull }; @@ -27,17 +31,19 @@ corenet_tcp_sendrecv_generic_port(tf2_t) corenet_tcp_bind_generic_port(tf2_t) corenet_tcp_bind_generic_node(tf2_t) -allow tf2_t tf2_ro_t:dir list_dir_perms; -allow tf2_t tf2_ro_t:file read_file_perms; -#allow tf2_t tf2_tmp_t:file manage_file_perms; -#allow tf2_t tf2_tmp_t:dir manage_dir_perms; +read_files_pattern(tf2_t, tf2_ro_t, tf2_ro_t) +read_lnk_files_pattern(tf2_t, tf2_ro_t, tf2_ro_t) +list_dirs_pattern(tf2_t, tf2_ro_t, tf2_ro_t) +mmap_files_pattern(tf2_t, tf2_ro_t, tf2_ro_t) manage_files_pattern(tf2_t, tf2_rw_t, tf2_rw_t) manage_dirs_pattern(tf2_t, tf2_rw_t, tf2_rw_t) setattr_files_pattern(tf2_t, tf2_rw_t, tf2_rw_t) +# TF2 wants to create /tmp/dumps +files_manage_generic_tmp_dirs(tf2_t) + sysnet_dns_name_resolve(tf2_t) -# files_tmp_filetrans(tf2_t, tf2_tmp_t, { file dir}) # Needed to load shared libs allow tf2_t tf2_exec_t:file execmod; @@ -50,3 +56,11 @@ kernel_read_system_state(tf2_t) # TF2 needs to read the network state kernel_read_network_state(tf2_t) + +# There's a lot of noise from these accesses +dontaudit tf2_t default_t:dir read; + +allow init_t tf2_t:process { noatsecure }; +allow tf2_t self:process execmem; + +list_dirs_pattern(tf2_t, games_data_t, games_data_t)