Add Call of Duty 4 policy
[selinux.git] / cod4 / cod4.te
diff --git a/cod4/cod4.te b/cod4/cod4.te
new file mode 100644 (file)
index 0000000..9d9a7a3
--- /dev/null
@@ -0,0 +1,26 @@
+policy_module(cod4, 0.1.13)
+
+# File context for the executable process
+type cod4_t;
+type cod4_exec_t;
+
+type cod4_rw_t;
+files_type(cod4_rw_t)
+
+type cod4_ro_t;
+files_type(cod4_ro_t)
+
+init_daemon_domain(cod4_t, cod4_exec_t)
+
+corenet_udp_sendrecv_generic_port(cod4_t)
+corenet_udp_bind_generic_port(cod4_t)
+corenet_udp_bind_generic_node(cod4_t)
+
+allow cod4_t cod4_ro_t:dir list_dir_perms;
+allow cod4_t cod4_ro_t:file read_file_perms;
+
+manage_files_pattern(cod4_t, cod4_rw_t, cod4_rw_t)
+manage_dirs_pattern(cod4_t, cod4_rw_t, cod4_rw_t)
+setattr_files_pattern(cod4_t, cod4_rw_t, cod4_rw_t)
+
+sysnet_dns_name_resolve(cod4_t)