--- nsaserefpolicy/policy/modules/services/cyphesis.fc	1969-12-31 19:00:00.000000000 -0500
+++ serefpolicy-3.5.5/policy/modules/services/cyphesis.fc	2008-08-25 10:50:15.000000000 -0400
@@ -0,0 +1,2 @@
+
+/usr/bin/cyphesis		--	gen_context(system_u:object_r:cyphesis_exec_t,s0)
--- nsaserefpolicy/policy/modules/services/cyphesis.if	1969-12-31 19:00:00.000000000 -0500
+++ serefpolicy-3.5.5/policy/modules/services/cyphesis.if	2008-08-25 10:50:15.000000000 -0400
@@ -0,0 +1,19 @@
+## <summary>policy for cyphesis</summary>
+
+########################################
+## <summary>
+##	Execute a domain transition to run cyphesis.
+## </summary>
+## <param name="domain">
+## <summary>
+##	Domain allowed to transition.
+## </summary>
+## </param>
+#
+interface(`cyphesis_domtrans',`
+	gen_require(`
+		type cyphesis_t, cyphesis_exec_t;
+	')
+
+	domtrans_pattern($1, cyphesis_exec_t, cyphesis_t)
+')
--- nsaserefpolicy/policy/modules/services/cyphesis.te	1969-12-31 19:00:00.000000000 -0500
+++ serefpolicy-3.5.5/policy/modules/services/cyphesis.te	2008-08-25 10:50:15.000000000 -0400
@@ -0,0 +1,92 @@
+policy_module(cyphesis, 1.0.0)
+
+########################################
+#
+# Declarations
+#
+
+type cyphesis_t;
+type cyphesis_exec_t;
+domain_type(cyphesis_t)
+init_daemon_domain(cyphesis_t, cyphesis_exec_t)
+
+type cyphesis_var_run_t;
+files_pid_file(cyphesis_var_run_t)
+
+type cyphesis_log_t;
+logging_log_file(cyphesis_log_t)
+
+type cyphesis_tmp_t;
+files_tmp_file(cyphesis_tmp_t)
+
+########################################
+#
+# cyphesis local policy
+#
+
+allow cyphesis_t self:process { setfscreate setsched signal };
+allow cyphesis_t self:fifo_file rw_fifo_file_perms;
+allow cyphesis_t self:tcp_socket create_stream_socket_perms;
+allow cyphesis_t self:unix_stream_socket create_stream_socket_perms;
+allow cyphesis_t self:unix_dgram_socket create_socket_perms;
+allow cyphesis_t self:netlink_route_socket create_netlink_socket_perms;
+
+# DAN> What is cyphesis looking for in /bin?
+corecmd_search_bin(cyphesis_t)
+corecmd_getattr_bin_files(cyphesis_t)
+
+manage_files_pattern(cyphesis_t, cyphesis_log_t, cyphesis_log_t)
+logging_log_filetrans(cyphesis_t, cyphesis_log_t, file)
+
+# DAN > Does cyphesis really create a sock_file in /tmp?  Why?
+allow cyphesis_t cyphesis_tmp_t:sock_file manage_sock_file_perms;
+files_tmp_filetrans(cyphesis_t, cyphesis_tmp_t, file)
+
+manage_files_pattern(cyphesis_t, cyphesis_var_run_t, cyphesis_var_run_t)
+manage_sock_files_pattern(cyphesis_t, cyphesis_var_run_t, cyphesis_var_run_t)
+files_pid_filetrans(cyphesis_t, cyphesis_var_run_t, { file sock_file })
+
+dev_read_urand(cyphesis_t)
+
+files_read_etc_files(cyphesis_t)
+files_read_usr_files(cyphesis_t)
+
+libs_use_ld_so(cyphesis_t)
+libs_use_shared_libs(cyphesis_t)
+
+miscfiles_read_localization(cyphesis_t)
+
+logging_send_syslog_msg(cyphesis_t)
+
+sysnet_dns_name_resolve(cyphesis_t)
+corenet_tcp_sendrecv_all_if(cyphesis_t)
+corenet_tcp_sendrecv_all_nodes(cyphesis_t)
+corenet_all_recvfrom_unlabeled(cyphesis_t)
+corenet_tcp_bind_all_nodes(cyphesis_t)
+corenet_tcp_bind_cyphesis_port(cyphesis_t)
+corenet_tcp_sendrecv_all_ports(cyphesis_t)
+
+# Init script handling
+domain_use_interactive_fds(cyphesis_t)
+
+kernel_read_system_state(cyphesis_t)
+kernel_read_kernel_sysctls(cyphesis_t)
+
+# cyphesis wants to talk to avahi via dbus
+optional_policy(`
+
+	dbus_system_bus_client_template(cyphesis, cyphesis_t)
+
+	optional_policy(`
+		avahi_dbus_chat(cyphesis_t)
+	')
+')
+
+optional_policy(`
+	postgresql_stream_connect(cyphesis_t)
+')
+
+optional_policy(`
+	kerberos_use(cyphesis_t)
+')
+
--- nsaserefpolicy/policy/modules/kernel/corenetwork.te.in	2008-08-11 11:23:34.000000000 -0400
+++ serefpolicy-3.5.5/policy/modules/kernel/corenetwork.te.in	2008-08-25 10:50:15.000000000 -0400
@@ -82,6 +83,7 @@
 network_port(clockspeed, udp,4041,s0)
 network_port(cluster, tcp,5149,s0, udp,5149,s0, tcp,40040,s0, tcp,50006,s0, udp,50006,s0, tcp,50007,s0, udp,50007,s0, tcp,50008,s0, udp,50008,s0)
 network_port(comsat, udp,512,s0)
+network_port(cyphesis, udp,32771,s0, tcp,6767,s0, tcp,6769,s0)
 network_port(cvs, tcp,2401,s0, udp,2401,s0)
 network_port(dcc, udp,6276,s0, udp,6277,s0)
 network_port(dbskkd, tcp,1178,s0)
