policy_module(testapp,1.0.0)
########################################
#
# Declarations
#
type testapp_t;
type testapp_exec_t;
domain_type(testapp_t)
#init_daemon_domain(testapp_t, testapp_exec_t)
########################################
#
# testapp local policy
#
# Check in /etc/selinux/refpolicy/include for macros to use instead of allow rul\
es.
# Some common macros (you might be able to remove some)
#files_read_etc_files(testapp_t)
libs_use_ld_so(testapp_t)
libs_use_shared_libs(testapp_t)
#miscfiles_read_localization(testapp_t)
## internal communication is often done using fifo and unix sockets.
#allow testapp_t self:fifo_file { read write };
#allow testapp_t self:unix_stream_socket create_stream_socket_perms;
########################################
#
# Test rules
#
# Allowing users to execute testapp
unconfined_domtrans_to(testapp_t,testapp_exec_t);